-
Notifications
You must be signed in to change notification settings - Fork 0
Clean docs and add Plausible tracking #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| # Created automatically by `bunx convex dev`: | ||
| # VITE_CONVEX_URL=https://<your-deployment>.convex.cloud | ||
|
|
||
| # Optional: enable Plausible Analytics in browser builds. | ||
| # Use the exact site domain configured in Plausible. | ||
| # VITE_PLAUSIBLE_DOMAIN=postwork.pcstyle.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Next | ||
|
|
||
| Postwork now has the core demo loop in place: a centered reading shell, routable feed filters, quick post creation, post detail with nested replies, spaces, walls, flash experiments, and AI summary/task surfaces. The next work should reduce prototype split-brain and make the deployed demo easier to evaluate. | ||
|
|
||
| ## 1. make spaces use real post threads | ||
|
|
||
| **Why it matters:** `convex/schema.ts` and `convex/spaces.ts` already model spaces, memberships, visibility, and space feeds, but the frontend still renders shared-space content from `src/lib/spaces.tsx` as session-only cards in `src/routes/SpacePage.tsx`. Those cards do not open durable `/posts/$postId` threads, so spaces feel like a parallel mock product. | ||
|
|
||
| **Done looks like:** creating or viewing a space post uses the same post detail, replies, unread, priority, search, and agent-summary mechanics as the main feed; visibility is legible; space feeds reuse post-card/thread primitives instead of inert local articles. | ||
|
|
||
| **Main files / areas:** `convex/schema.ts`, `convex/posts.ts`, `convex/spaces.ts`, `src/lib/spaces.tsx`, `src/routes/SpacePage.tsx`, `src/routes/SpacesPage.tsx`, `src/components/PostCard.tsx`, `src/routes/PostPage.tsx`. | ||
|
|
||
| ## 2. consolidate composer surfaces | ||
|
|
||
| **Why it matters:** the app has multiple creation paths with slightly different behavior: `QuickPostBar`, `NewPostDialog`, `WallPostDialog`, reply `Composer`, and the space-local composer. That makes the prototype harder to reason about and easier to regress. | ||
|
|
||
| **Done looks like:** one composer vocabulary covers posts, replies, wall notes, and space posts where appropriate; validation, disabled states, priority controls, submit shortcuts, and navigation after creation are consistent. | ||
|
|
||
| **Main files / areas:** `src/components/QuickPostBar.tsx`, `src/components/NewPostDialog.tsx`, `src/components/WallPostDialog.tsx`, `src/components/Composer.tsx`, `src/routes/SpacePage.tsx`, `src/lib/store.tsx`. | ||
|
|
||
| ## 3. harden the AI catch-up loop | ||
|
|
||
| **Why it matters:** agent summaries and dispatched agent tasks are the clearest differentiator from chat, but they are still split between post summary regeneration, in-memory task state, and local reply injection. | ||
|
|
||
| **Done looks like:** stale summaries are obvious after new replies; summary copy explains included context; agent-task results are easy to find from the post and `/agents`; failed/no-key states remain calm; transcripts include enough nested reply context to be useful. | ||
|
|
||
| **Main files / areas:** `src/components/AgentSummary.tsx`, `src/components/AgentTasksPanel.tsx`, `src/components/ReplyTree.tsx`, `src/components/SendAgentButton.tsx`, `src/lib/agentTasks.tsx`, `convex/ai.ts`, `convex/agentTasks.ts`. | ||
|
|
||
| ## 4. prune or graduate flash experiments | ||
|
|
||
| **Why it matters:** the lab still contains shipped, deprecated, and active ideas. That is useful while designing, but the demo should not make evaluators wonder which shell/composer is canonical. | ||
|
|
||
| **Done looks like:** shipped experiments are clearly historical or removed from the active lab; deprecated experiments either explain their lesson briefly or move to archive; the default app shell remains the canonical experience. | ||
|
|
||
| **Main files / areas:** `src/flashExperiments/*`, `src/routes/FlashExperimentsPage.tsx`, `src/components/AppShell.tsx`, `docs/archive/`. | ||
|
|
||
| ## 5. run a deployed-demo polish pass | ||
|
|
||
| **Why it matters:** the product promise depends on immediate readability: quiet density, priority at a glance, and no rough prototype seams. | ||
|
|
||
| **Done looks like:** feed, post detail, new post, replies, agents, spaces, walls, and flash lab are checked at desktop and narrow widths; focus states and keyboard paths work; lowercase chrome and single-accent discipline hold; empty/loading/error states share the same voice; Vercel/Plausible/Convex deploy notes are current. | ||
|
|
||
| **Main files / areas:** `src/routes/*`, `src/components/*`, `src/index.css`, `README.md`, `docs/product.md`, `docs/design.md`. |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { init } from "@plausible-analytics/tracker"; | ||
|
|
||
| const plausibleDomain = import.meta.env.VITE_PLAUSIBLE_DOMAIN; | ||
|
|
||
| declare global { | ||
| interface Window { | ||
| __postworkPlausibleInitialized?: boolean; | ||
| } | ||
| } | ||
|
|
||
| if (plausibleDomain && typeof window !== "undefined" && !window.__postworkPlausibleInitialized) { | ||
| try { | ||
| init({ | ||
| domain: plausibleDomain, | ||
| outboundLinks: true, | ||
| }); | ||
| window.__postworkPlausibleInitialized = true; | ||
| } catch { | ||
| // Analytics is optional; never block app startup. | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,9 @@ | ||
| /// <reference types="vite/client" /> | ||
|
|
||
| interface ImportMetaEnv { | ||
| readonly VITE_PLAUSIBLE_DOMAIN?: string; | ||
| } | ||
|
|
||
| interface ImportMeta { | ||
| readonly env: ImportMetaEnv; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.