feat(channels): replace Home canvas with a static channel homepage#2963
feat(channels): replace Home canvas with a static channel homepage#2963raquelmsmith wants to merge 3 commits into
Conversation
Channels no longer auto-create a "Home" canvas. Clicking a channel name in the sidebar now expands the channel in the tree and opens a new static homepage at the channel index (/website/$channelId). The homepage: - "What can I do for you today?" heading that fades away as the recent list scrolls up, Slack-style. - A chat-like stack of the channel's recent tasks + canvases (most recent at the bottom, against the composer), pinned to the bottom on load. - A prompt box that files a new task into the channel (reuses the task-creation pipeline, repo-less), with a "See suggestions" toggle that reveals the same starter prompts as the new-task screen. - A CONTEXT.md button pinned to the far right of the top nav bar. The canvases grid moved to its own /canvases sub-route (the channel index used to be the grid). The home-canvas service/hooks are left intact for back-compat. Drive-by: fix a build-breaking `sonner` import in FolderPicker (the package was removed); point it at the repo toast primitive so the app builds. Generated-By: PostHog Code Task-Id: 41e5619b-61ee-4428-a8e0-355ffcb746a7
|
React Doctor found 4 issues in 2 files · 4 warnings. 4 warnings
Reviewed by React Doctor for commit |
|
Reviews (1): Last reviewed commit: "feat(channels): replace Home canvas with..." | Re-trigger Greptile |
| const adapter = lastUsedAdapter; | ||
| const setAdapter = (next: AgentAdapter) => setLastUsedAdapter(next); |
There was a problem hiding this comment.
setAdapter is a new arrow function on every render and is passed directly as onAdapterChange to UnifiedModelSelector. If that component uses React.memo, this will defeat memoisation and cause unnecessary re-renders of the model selector on every keystroke or state change in the parent. Wrapping it in useCallback keeps the reference stable.
| const adapter = lastUsedAdapter; | |
| const setAdapter = (next: AgentAdapter) => setLastUsedAdapter(next); | |
| const adapter = lastUsedAdapter; | |
| const setAdapter = useCallback( | |
| (next: AgentAdapter) => setLastUsedAdapter(next), | |
| [setLastUsedAdapter], | |
| ); |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Wrap setAdapter in useCallback so its reference stays stable across renders and doesn't defeat memoisation of the model selector it's passed to. Addresses a Greptile review note. Generated-By: PostHog Code Task-Id: 41e5619b-61ee-4428-a8e0-355ffcb746a7
…oud selector Addresses review feedback on the channel homepage: - The heading is now an overlay pinned over the top of the recent list with a gradient that fades the list out beneath it. It's fully shown on load and fades away as the list scrolls up, so every task can be read. - Suggestions now render inside the task list (pushing it up) instead of floating over it, and the "See suggestions" toggle moved to the right side above the prompt box (next to the new selector). - Added a local/cloud workspace-mode selector to the prompt box. Generated-By: PostHog Code Task-Id: 41e5619b-61ee-4428-a8e0-355ffcb746a7
Problem
Each channel auto-created a "Home" canvas as its landing surface. We want the channel landing to be a static, chat-like homepage instead — somewhere to see recent work and kick off a new task — not a generated canvas.
Why: @raquelmsmith asked to turn the channel Home from a canvas into a static page: clicking the channel name should expand the sidebar and open a homepage with a heading, a prompt box, a CONTEXT.md opener, and a Slack-style stack of recent tasks/canvases. No more auto-created Home canvas.
Changes
/website/$channelId(the channel index), replacing the auto-created Home canvas:ChannelHomeComposer) that files a new task into the channel, reusing the real task-creation pipeline (repo-less). A muted "See suggestions" toggle reveals the same starter-prompt cards used on the new-task screen./website/$channelId/canvasessub-route (the channel index used to be the grid). The home-canvas service/hooks are left intact for back-compat with existing channels.channel_home.FolderPickerimportedtoastfromsonner, which was removed from the repo and broke the build — repointed it at the repo toast primitive.How did you test this?
pnpm --filter @posthog/ui typecheck— no new type errors from these changes.pnpm --filter @posthog/web build— succeeds and bundles the new components/routes (it was failing before thesonnerfix).Automatic notifications
Created with PostHog Code