feat(today): adopt desktop's chrome in the today layout - #110696
adamleithp wants to merge 6 commits into
Conversation
|
✨ Submitted to Merge by @adamleithp. It will be added to the merge queue once all branch protection rules pass. See more details here. |
|
Risk: No findings The delta since the last review only registers the existing AIO observability scorer-detail scene ( Sentinel reviewed |
🤖 CI report✅ Trunk lane — non-backend laneThis PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes.
|
| Function | Location | Complexity | Limit |
|---|---|---|---|
QueryWindow |
frontend/src/scenes/data-warehouse/editor/QueryWindow.tsx:74 |
35 | 10 |
LemonSceneTitleSection |
frontend/src/layout/scenes/components/SceneTitleSection.tsx:145 |
28 | 10 |
Navigation |
frontend/src/layout/navigation-3000/Navigation.tsx:32 |
25 | 10 |
QuillSceneTitleSection |
frontend/src/layout/scenes/components/QuillSceneTitleSection.tsx:23 |
22 | 10 |
SceneDescription |
frontend/src/layout/scenes/components/SceneDescription.tsx:27 |
21 | 10 |
SceneName |
frontend/src/layout/scenes/components/SceneTitleSection.tsx:357 |
20 | 10 |
TaskRunSceneShell |
products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunSceneShell.tsx:63 |
20 | 10 |
TodaySpacesRow |
frontend/src/layout/today/TodaySpacesRow.tsx:35 |
19 | 10 |
sqlEditor |
frontend/src/scenes/urls.ts:74 |
17 | 10 |
TodaySpacesSidebar |
frontend/src/layout/today/TodaySpacesSidebar.tsx:35 |
16 | 10 |
TodayViewsSidebar |
frontend/src/layout/today/TodayViewsSidebar.tsx:24 |
16 | 10 |
sessionItem |
frontend/src/layout/today/todayWorkItems.ts:133 |
15 | 10 |
railPaneForPath |
frontend/src/layout/today/todayShellLogic.ts:45 |
13 | 10 |
sessionBadges |
frontend/src/layout/today/todayWorkItems.ts:177 |
13 | 10 |
QuillSceneName |
frontend/src/layout/scenes/components/QuillSceneName.tsx:26 |
12 | 10 |
blur |
frontend/src/layout/scenes/components/useSceneNameEditing.ts:103 |
12 | 10 |
TodaySessionRow |
frontend/src/layout/today/TodaySessionRow.tsx:36 |
11 | 10 |
✅ Duplication (Python) — clean
New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.
⚠️ Duplication (TypeScript) — 1 new duplicated block (worst 92 tokens)
New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.
| First copy | Second copy | Lines | Tokens |
|---|---|---|---|
frontend/src/layout/today/todayRecentsLogic.ts:53 |
frontend/src/layout/today/todayViewsLogic.ts:121 |
31 | 92 |
⚠️ Comment density — 4% of added code lines are comments (75 of 2097)
This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.
Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.
Files with the most added comment lines:
| File | Comment lines | Added lines |
|---|---|---|
frontend/src/layout/scenes/components/useSceneNameEditing.ts |
15 | 129 |
frontend/src/layout/scenes/components/SceneTitlePanelButton.tsx |
8 | 116 |
frontend/src/layout/today/TodayPaneSearchList.tsx |
8 | 79 |
frontend/src/layout/today/todayRecentsLogic.ts |
8 | 140 |
frontend/src/layout/scenes/components/QuillSceneHeader.tsx |
4 | 30 |
frontend/src/layout/today/TodaySessionIcon.tsx |
4 | 20 |
frontend/src/layout/scenes/components/QuillSceneName.tsx |
3 | 128 |
frontend/src/layout/today/TodaySpacesRow.tsx |
3 | 62 |
This check does not block merging. It updates on every push and clears when the share drops.
⚠️ Bundle size — 🔺 +19.8 KiB (+0.0%)
Uncompressed size of every built .js bundle, compared against the base branch.
Total: 69.66 MiB · 🔺 +19.8 KiB (+0.0%)
| File | Size | Δ vs base |
|---|---|---|
posthog-app/src/scenes/tools/Tools.js |
5.9 KiB | 🔺 +5.9 KiB (new) |
posthog-app/src/scenes/views/NewView.js |
5.4 KiB | 🔺 +5.4 KiB (new) |
posthog-app/src/scenes/AuthenticatedShell.js |
305.4 KiB | 🔺 +2.1 KiB (+0.7%) |
posthog-app/_parent/products/posthog_ai/frontend/scenes/TaskTracker/TaskTracker.js |
86.2 KiB | 🟢 -1.0 KiB (-1.2%) |
Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report
✅ Eager graph — within budget
How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.
| Root | Eager (shipped) | Δ vs base | Budget |
|---|---|---|---|
entry (logged-out pages, app bootstrap)src/index.tsx |
1.63 MiB · 22 files | 🔺 +878 B (+0.1%) | █████████░ 88.7% of 1.84 MiB |
logged-out boot: index + App + bootApp (preloaded by every page, including /login)src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts |
3.72 MiB · 660 files | 🔺 +1.1 KiB (+0.0%) | █████████░ 92.3% of 4.03 MiB |
authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
7.70 MiB · 2,491 files | 🟢 -118.3 KiB (-1.5%) | █████████░ 92.4% of 8.34 MiB |
dashboard scenesrc/scenes/dashboard/Dashboard.tsx |
9.67 MiB · 3,397 files | 🔺 +8.2 KiB (+0.1%) | ███████░░░ 71.7% of 13.48 MiB |
project home scenesrc/scenes/project-homepage/ProjectHomepage.tsx |
14.04 MiB · 5,036 files | 🔺 +10.4 KiB (+0.1%) | █████████░ 85.4% of 16.44 MiB |
events scenesrc/scenes/activity/explore/EventsScene.tsx |
9.29 MiB · 3,249 files | 🔺 +8.2 KiB (+0.1%) | ███████░░░ 73.5% of 12.64 MiB |
replay detail scenesrc/scenes/session-recordings/detail/SessionRecordingDetail.tsx |
12.11 MiB · 4,126 files | 🔺 +8.2 KiB (+0.1%) | ████████░░ 77.1% of 15.72 MiB |
🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
Largest files eagerly shipped from src/index.tsx
| Size | File |
|---|---|
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 24.6 KiB | ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js |
| 6.3 KiB | ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js |
| 4.5 KiB | ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js |
| 3.9 KiB | ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js |
| 1.4 KiB | ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js |
| 1.3 KiB | src/index.tsx |
| 1.3 KiB | src/RootErrorBoundary.tsx |
| 912 B | ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js |
| 854 B | src/scenes/ChunkLoadErrorBoundary.tsx |
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
| Size | File |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 220.3 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 100.5 KiB | src/lib/api.ts |
| 92.5 KiB | src/products.tsx |
| 69.4 KiB | src/lib/lemon-ui/icons/icons.tsx |
| 40.1 KiB | src/lib/utils/eventUsageLogic.ts |
| 38.7 KiB | ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js |
| 33.9 KiB | ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js |
| 29.0 KiB | ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 279.9 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.7 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 111.6 KiB | ../packages/quill/packages/quill/dist/index.js |
| 100.5 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 92.5 KiB | src/products.tsx |
| 90.6 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
| Size | File |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 279.9 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.8 KiB | src/queries/validators.js |
| 153.7 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 111.6 KiB | ../packages/quill/packages/quill/dist/index.js |
| 100.5 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 92.5 KiB | src/products.tsx |
Largest files eagerly shipped from src/scenes/project-homepage/ProjectHomepage.tsx
| Size | File |
|---|---|
| 315.5 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 279.9 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.8 KiB | src/queries/validators.js |
| 153.7 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 111.6 KiB | ../packages/quill/packages/quill/dist/index.js |
| 100.5 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
| Size | File |
|---|---|
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 279.9 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.8 KiB | src/queries/validators.js |
| 153.7 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 111.6 KiB | ../packages/quill/packages/quill/dist/index.js |
| 100.5 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 92.5 KiB | src/products.tsx |
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
| Size | File |
|---|---|
| 315.5 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 306.2 KiB | ../node_modules/.pnpm/posthog-js@1.435.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 279.9 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 220.3 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.8 KiB | src/queries/validators.js |
| 153.7 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 111.6 KiB | ../packages/quill/packages/quill/dist/index.js |
| 100.5 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479
✅ Toolbar bundle — eager 2.20 MiB within budget
What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.
| Metric | Size | Δ vs base | Budget |
|---|---|---|---|
| Eager (shipped) entry + static imports |
2.20 MiB · 19 files | 🔺 +2.8 KiB (+0.1%) | ████░░░░░░ 38.5% of 5.72 MiB |
| Deferred (lazy) | 2.11 MiB · 44 files | no change | n/a — loads on demand |
Loader dist/toolbar.js |
1.2 KiB | no change | █░░░░░░░░░ 6.0% of 19.5 KiB |
Largest eagerly-shipped chunks
| Size | File |
|---|---|
| 837.0 KiB | dist/toolbar/toolbar-app-IXUPV6HS.css |
| 657.4 KiB | dist/toolbar/chunk-chunk-TNRTR3I3.js |
| 259.4 KiB | dist/toolbar/chunk-chunk-SVMAQ3OC.js |
| 138.2 KiB | dist/toolbar/chunk-chunk-BUO6MW6E.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 75.2 KiB | dist/toolbar/toolbar-app-VKACUART.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-LWEC4HSN.js |
| 21.0 KiB | dist/toolbar/chunk-chunk-AVIOSREB.js |
| 6.8 KiB | dist/toolbar/chunk-chunk-DV7IWQNF.js |
Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile
✅ Dist folder size — 🔺 +257.1 KiB (+0.0%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 959.52 MiB · 🔺 +257.1 KiB (+0.0%)
⚠️ Playwright — 1 failed
🎭 Playwright report · View test results →
❌ 1 failed test:
- create experiment via wizard, add metrics, and launch (chromium)
These issues are not necessarily caused by your changes.
Annoyed by this section? Help fix flakies and failures and it will go green!
⚠️ MCP snapshots — 1 updated (1 modified, 0 added, 0 deleted)
Snapshots: MCP unit test snapshots updated
Changes: 1 snapshots (1 modified, 0 added, 0 deleted)
What this means:
- Snapshots have been automatically updated to match current output
Next steps:
- Review the changes to ensure they're intentional
- If unexpected, investigate what caused the output to change
🦔 Hogbox preview · ✅ ready▶ Open the preview
commit |
👀 Auto-assigned reviewersThese soft owners were skipped because they only have minor changes here. Nothing blocks merge, so self-assign if you'd like a look:
Soft owners come from each directory's |
|
[Medium risk] Refactors the Today layout UI to adopt desktop design patterns. The PR is not ready to merge until recently viewed data is complete and project-scoped and the explicit frontend UI requirements are met. Reviews (1) · Last reviewed commit: "feat(today): adopt desktop's chrome in t..." |
| recentlyViewedSessions: [ | ||
| (s) => [s.recentSessionIds, s.allRecentItems, s.recentQuery], | ||
| (recentSessionIds: string[], allRecentItems: TodayWorkItem[], recentQuery: string): TodayWorkItem[] => | ||
| recentSessionIds | ||
| .flatMap((id) => allRecentItems.find((item) => item.kind === 'session' && item.id === id) ?? []) | ||
| .filter((item) => matchesPaneQuery(item.title || '', recentQuery)), |
There was a problem hiding this comment.
Viewed sessions go missing A session opened from Pinned, or one that falls outside the capped Recent list, is recorded as viewed but cannot appear in Recently viewed. This selector looks only in
allRecentItems, which excludes pinned sessions and limits the remaining results. Resolve recorded session IDs independently of that list.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/layout/today/todaySpacesLogic.ts
Line: 624-629
Comment:
**Viewed sessions go missing** A session opened from Pinned, or one that falls outside the capped Recent list, is recorded as viewed but cannot appear in Recently viewed. This selector looks only in `allRecentItems`, which excludes pinned sessions and limits the remaining results. Resolve recorded session IDs independently of that list.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| .flatMap((entry) => { | ||
| const href = VIEW_FILE_SYSTEM_TYPES.has(baseObjectType(entry.type)) | ||
| ? libraryObjectHref(entry) | ||
| : null |
There was a problem hiding this comment.
Canvas visits are omitted Opening a canvas cannot add it to Views' Recently viewed group because this check accepts only dashboard and notebook filesystem types. Canvases are also Views; include them in the view-recents classification.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/layout/today/todayRecentsLogic.ts
Line: 120-123
Comment:
**Canvas visits are omitted** Opening a canvas cannot add it to Views' Recently viewed group because this check accepts only dashboard and notebook filesystem types. Canvases are also Views; include them in the view-recents classification.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| recentSessionIds: [ | ||
| [] as string[], | ||
| { persist: true }, | ||
| { recordSessionVisit: (state, { sessionId }) => pushRecent(state, sessionId) }, |
There was a problem hiding this comment.
Projects share session history Session IDs are persisted in one five-item browser-wide list. If visits in project A fill that list, then visiting one session in project B leaves only that session eligible for B's Recently viewed group. Store session recents per project so each project keeps its own last five visits.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/layout/today/todayRecentsLogic.ts
Line: 109-112
Comment:
**Projects share session history** Session IDs are persisted in one five-item browser-wide list. If visits in project A fill that list, then visiting one session in project B leaves only that session eligible for B's Recently viewed group. Store session recents per project so each project keeps its own last five visits.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| {hasPinned && ( | ||
| <TodayPaneSection | ||
| label="Pinned" | ||
| {...sectionLayout('pinned')} | ||
| count={pinnedItems.length} | ||
| onToggle={() => toggleSection('pinned')} | ||
| dataAttr="today-section-pinned" | ||
| > | ||
| {shownPinnedItems.map((item) => | ||
| renderItem(item, 'pinned', 'today-pinned-session', true) |
There was a problem hiding this comment.
Search leaves misleading counts Search filters the Pinned and Spaces rows, but their collapsed counts still come from the unfiltered lists. A section can claim results that opening it will not show, and Pinned can remain visible with no matching rows. Use the filtered rows for section presence and counts while searching.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/layout/today/TodaySpacesSidebar.tsx
Line: 190-199
Comment:
**Search leaves misleading counts** Search filters the Pinned and Spaces rows, but their collapsed counts still come from the unfiltered lists. A section can claim results that opening it will not show, and Pinned can remain visible with no matching rows. Use the filtered rows for section presence and counts while searching.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| <QuillSceneHeader | ||
| className={cn( | ||
| 'z-30 bg-[var(--scene-layout-background)] @2xl/main-content:sticky -top-[calc(var(--spacing)*4)]', | ||
| !noPadding && '-mx-4 -mt-4', | ||
| className | ||
| )} |
There was a problem hiding this comment.
Borderless titles gain borders The SQL editor passes
noBorder for its embedded title, but this branch drops the prop and QuillSceneHeader always draws a bottom border. Under the Today flag, that breaks the editor's borderless title layout. Honor noBorder here.
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/layout/scenes/components/QuillSceneTitleSection.tsx
Line: 60-65
Comment:
**Borderless titles gain borders** The SQL editor passes `noBorder` for its embedded title, but this branch drops the prop and `QuillSceneHeader` always draws a bottom border. Under the Today flag, that breaks the editor's borderless title layout. Honor `noBorder` here.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| actions={ | ||
| <> | ||
| {!hideProductSetupButton && <ProductSetupButton />} | ||
| {actions} | ||
| <SceneTitlePanelButton maxToolProps={maxToolProps} maxButtonLabel={maxButtonLabel} /> |
There was a problem hiding this comment.
Title mixes component libraries This Quill title renders LemonUI controls, including
ProductSetupButton, ReleaseStageTag, and SceneDescription. The frontend guide requires Quill and LemonUI not to be mixed inside one component. Provide Quill-compatible controls before merging.
File Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/layout/scenes/components/QuillSceneTitleSection.tsx
Line: 108-112
Comment:
**Title mixes component libraries** This Quill title renders LemonUI controls, including `ProductSetupButton`, `ReleaseStageTag`, and `SceneDescription`. The frontend guide requires Quill and LemonUI not to be mixed inside one component. Provide Quill-compatible controls before merging.
**File Used:** `AGENTS.md` ([source](https://github.com/posthog/posthog/blob/e81a403186eb78c2448ba3c5cf85b07490e6d80c/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.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!
| <ItemGroup data-quill className="max-w-160 gap-2"> | ||
| {VIEW_TYPES.map((info) => ( | ||
| <Item | ||
| key={info.type} | ||
| variant="outline" | ||
| render={<button type="button" />} | ||
| className="text-start text-foreground hover:bg-fill-hover" | ||
| onClick={() => pickNewViewType(info.type)} |
There was a problem hiding this comment.
Flag-off pages render Quill The New view and Tools routes are available without
today-rail-nav, but both page bodies render Quill controls unconditionally. The frontend guide requires the flag-off web UI to remain on LemonUI. Gate their Quill presentation or provide a LemonUI path before merging.
File Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/scenes/views/NewView.tsx
Line: 29-36
Comment:
**Flag-off pages render Quill** The New view and Tools routes are available without `today-rail-nav`, but both page bodies render Quill controls unconditionally. The frontend guide requires the flag-off web UI to remain on LemonUI. Gate their Quill presentation or provide a LemonUI path before merging.
**File Used:** `AGENTS.md` ([source](https://github.com/posthog/posthog/blob/e81a403186eb78c2448ba3c5cf85b07490e6d80c/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.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!
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe Today workspace adds shared searchable pane components, recent views, tools, and sessions, and routes for Tools and New view. Scene titles and task headers now use shared header and name-editing components. The changes also update Today navigation styling and session icon rendering. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (6)
products/tasks/frontend/spaces/SpaceFeedStatusIcon.tsx-8-9 (1)
8-9: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRestore the accessible status label for chat sessions.
TodaySessionStatusDotpreserves labels for running and terminal statuses on its dot or spinner child.TodaySessionIconrenders chat sessions as an unlabeledIconChat, so chat status is no longer announced. Add the formerrole="img"andaria-label="Chat"behavior for the chat branch only.frontend/src/layout/scenes/components/QuillSceneName.tsx-78-81 (1)
78-81: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReturn focus to the trigger after keyboard exits.
When
forceEditis false, Escape callscancel()and Enter exits through blur. The input then unmounts without restoring focus to the edit button, so keyboard users can lose focus from the title control. Restore focus only for Escape and Enter, not for blur-driven exits.frontend/src/layout/today/TodayLibrarySidebar.tsx-25-25 (1)
25-25: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMove the query state into Kea.
TodayLibrarySidebarusesuseStatefor the pane query. The frontend convention prohibitsuseStateanduseEffectfor local state. Its exception applies only to reusable components infrontend/src/lib, while this component is infrontend/src/layout/today. Add aqueryreducer tolibraryLogicor a smalltodayLibraryLogic, and derive the filtered types in a selector.frontend/src/layout/today/todayShellLogic.ts-236-236 (1)
236-236: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPreserve the current page when the active pane is selected.
railPaneForPathassigns dashboards and notebooks to theviewspane. Therefore, selecting Views from/dashboard/12should not navigate to/views/new. Add the guard below. It preserves the current page for the active pane and still navigates to the roots for Spaces and Tools when those panes are not active.Suggested fix
- router.actions.push(RAIL_PANE_HOME[pane]()) + if (values.routePane !== pane) { + router.actions.push(RAIL_PANE_HOME[pane]()) + }frontend/src/layout/today/TodaySpacesSidebar.tsx-309-370 (1)
309-370: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRender no-match states for Spaces and Pinned.
When
visibleSpacesis nonempty butshownSpacesis empty,spacesStatereceives the unfiltered count forshown. The helper returnsready, so the section renders no rows and no clear action. Pass the filtered count and add the existing Recent-styleNo matchesnotice usingclearRecentSearchAndFilters.Suggested fix
const spacesState = todaySidebarSectionState({ loading: spacesLoading, failed: spacesUnavailable, total: visibleSpaces.length, - shown: visibleSpaces.length, + shown: shownSpaces.length, })Pinned has no
pinnedState; it mapsshownPinnedItemsdirectly. When pinned items exist but the query excludes all of them, render the sameNo matchesnotice and clear action whenshownPinnedItems.length === 0. The shown-count change alone does not fix Pinned.frontend/src/layout/today/todaySpacesLogic.ts-622-629 (1)
622-629: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep recorded tasks visible in “Recently viewed.”
When
/ai?task=<id>is opened,todayRecentsLogicrecords the task ID. If the task is outside the 30-item recent-task response and is not pinned,buildRecentItemsdoes not produce a session item for it.conversationHistoryis loaded separately as conversations, andrecentlyViewedSessionsonly matcheskind === 'session'. The recorded ID is therefore dropped, soTodaySpacesSidebaromits the task. Add a direct lookup or merge for recorded task IDs before filtering them.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 0c068ffd-f4c0-4f0d-b81c-657f12fd313b
📒 Files selected for processing (59)
frontend/src/layout/navigation-3000/Navigation.tsxfrontend/src/layout/scenes/components/QuillSceneHeader.tsxfrontend/src/layout/scenes/components/QuillSceneName.tsxfrontend/src/layout/scenes/components/QuillSceneTitleSection.tsxfrontend/src/layout/scenes/components/SceneDescription.tsxfrontend/src/layout/scenes/components/SceneTitlePanelButton.test.tsxfrontend/src/layout/scenes/components/SceneTitlePanelButton.tsxfrontend/src/layout/scenes/components/SceneTitleSection.tsxfrontend/src/layout/scenes/components/sceneResourceIcon.tsxfrontend/src/layout/scenes/components/useSceneNameEditing.tsfrontend/src/layout/today/TodayChatRow.tsxfrontend/src/layout/today/TodayFilterMenuTrigger.tsxfrontend/src/layout/today/TodayLibrarySidebar.tsxfrontend/src/layout/today/TodayListAppearanceDialog.tsxfrontend/src/layout/today/TodayPaneGroupLabel.tsxfrontend/src/layout/today/TodayPaneOption.tsxfrontend/src/layout/today/TodayPaneRow.tsxfrontend/src/layout/today/TodayPaneSearchField.tsxfrontend/src/layout/today/TodayPaneSearchList.tsxfrontend/src/layout/today/TodayRail.tsxfrontend/src/layout/today/TodayRailTile.tsxfrontend/src/layout/today/TodayRecentSearchField.tsxfrontend/src/layout/today/TodaySessionIcon.tsxfrontend/src/layout/today/TodaySessionRow.tsxfrontend/src/layout/today/TodaySessionStatusIcon.tsxfrontend/src/layout/today/TodayShell.scssfrontend/src/layout/today/TodayShell.tsxfrontend/src/layout/today/TodaySidebarFooter.tsxfrontend/src/layout/today/TodaySpacesRow.tsxfrontend/src/layout/today/TodaySpacesSidebar.tsxfrontend/src/layout/today/TodayToolsSidebar.tsxfrontend/src/layout/today/TodayViewsSidebar.tsxfrontend/src/layout/today/todayPaneSearch.tsfrontend/src/layout/today/todayRecentsLogic.tsfrontend/src/layout/today/todaySessionIcon.test.tsfrontend/src/layout/today/todaySessionIcon.tsfrontend/src/layout/today/todayShellLogic.test.tsfrontend/src/layout/today/todayShellLogic.tsfrontend/src/layout/today/todaySpacesLogic.tsfrontend/src/layout/today/todayToolsLogic.tsfrontend/src/layout/today/todayViewsLogic.tsfrontend/src/layout/today/todayWorkItems.tsfrontend/src/scenes/appScenes.tsfrontend/src/scenes/data-warehouse/editor/QueryWindow.tsxfrontend/src/scenes/project-homepage/today/Today.scssfrontend/src/scenes/project-homepage/today/Today.stories.tsxfrontend/src/scenes/project-homepage/today/TodayHomeSidebar.tsxfrontend/src/scenes/sceneTypes.tsfrontend/src/scenes/scenes.tsfrontend/src/scenes/tools/Tools.tsxfrontend/src/scenes/tools/toolsLogic.tsfrontend/src/scenes/tools/toolsUtils.tsfrontend/src/scenes/urls.tsfrontend/src/scenes/views/NewView.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/QuillTaskTitle.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunSceneShell.tsxproducts/tasks/frontend/spaces/SpaceFeedStatusIcon.tsxservices/mcp/src/tools/links/app-url-manifest.jsonservices/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json
💤 Files with no reviewable changes (8)
- frontend/src/scenes/project-homepage/today/TodayHomeSidebar.tsx
- frontend/src/layout/today/todaySessionIcon.ts
- frontend/src/layout/today/TodaySessionStatusIcon.tsx
- products/posthog_ai/frontend/scenes/TaskTracker/components/QuillTaskTitle.tsx
- frontend/src/layout/today/TodayRecentSearchField.tsx
- frontend/src/layout/today/todaySessionIcon.test.ts
- frontend/src/scenes/project-homepage/today/Today.scss
- frontend/src/layout/today/TodayPaneSearchField.tsx
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
|
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (1)
frontend/src/layout/scenes/components/SceneTitleSection.tsx-406-411 (1)
406-411: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winIgnore Enter during IME composition in both scene-name inputs.
useSceneNameEditing.saveFromEnterimmediately callsonChangewhensaveOnBluris enabled and the value changed. BothSceneNameandQuillSceneNamecall it for every Enter press without checkingisComposing.The Lemon behavior existed in the PR base. The head also routes the Today rail through
QuillSceneName, so apply the guard to both handlers.Suggested fix
// frontend/src/layout/scenes/components/SceneTitleSection.tsx - if (e.key === 'Enter') { + if (e.key === 'Enter' && !e.nativeEvent.isComposing) { e.preventDefault() saveFromEnter(e.currentTarget.value)// frontend/src/layout/scenes/components/QuillSceneName.tsx - if (event.key === 'Enter') { + if (event.key === 'Enter' && !event.nativeEvent.isComposing) { event.preventDefault() saveFromEnter(event.currentTarget.value) if (!forceEdit) {
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 05d68002-52c8-41ab-8acd-a59f19db21c9
📒 Files selected for processing (1)
frontend/src/layout/scenes/components/SceneTitleSection.tsx
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
Rail, sidebar pane and content sit side by side with quill borders, like PostHog Desktop. The rail shows labelled tiles and opens each section. Sidebar panes and scene titles share one 48px title bar, and every pane gets a keyboard-navigable quill autocomplete list with recently viewed items on top. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… url manifest Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
a43c6ed to
e4fffed
Compare
# Conflicts: # services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json
|
/trunk merge |
Problem
today-rail-navon, the web shell doesn't look like PostHog Desktop.Changes
--borderseams.--chromebackground.QuillSceneHeader, a fixed 48px bar, so their bottom borders line up.SceneTitleSectionrendersQuillSceneTitleSection. Its name tints on hover and turns into a field of the same size on click.useSceneNameEditing. It covers debounce, save-on-blur, always-editing for new objects and generated names.QuillTaskTitleis gone.todayRecentsLogic.TodaySessionIcon(a status dot, or a chat bubble for chats) for sidebar rows, the space feed and the AI task header./views/newlets you pick canvas, notebook or dashboard./toolslists every tool by category.SceneDescription,SceneTitlePanelButtonandsceneResourceIconmoved out ofSceneTitleSection.tsx, which drops from 860 to about 360 lines.layout/todaytoscenes/tools/.TodaySidebarFootermoved from SCSS to Tailwind.layout/todaycomponents and logic state were deleted.Note
The
/views/newand/toolsroutes are registered for everyone. With the flag off, nothing links to them.How did you test this code?
layout/today,layout/scenes/components,products/tasks/frontend/spacesandproducts/posthog_ai/frontend/scenes/TaskTracker.Test rationale:
todayShellLogic.test.tsgains one case per rail item, asserting the page it opens. That catches a pane that stops navigating, or goes to the wrong section.todaySessionIcon.test.tsis deleted along with the module it tested.👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Release status
Automatic notifications
Docs update
None. This is internal UI behind
today-rail-nav.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (1M context)
/writing-ui-components,/writing-code-comments,/writing-tests,/writing-pr-descriptions,/reviewing-with-coderabbit. A strict maintainability review ran before opening. It removed the parallel option lists, the dual-mode Spaces row, filtering in components, and the duplicate header component.QuillSceneName.🤖 Generated with Claude Code