Repository navigation
Docs folders and length limits, the inbox reading pane, and project tabs - #90
Conversation
The doc tree nested correctly but had no way to close a branch, so a workspace with a deep handbook rendered every descendant at once and scrolling was the only navigation. Rows that have children now carry a disclosure control, closing one hides its whole branch and leaves its siblings alone, and the builder reports a child count so a leaf gets no control at all. ancestorsOf names the chain above a doc, so opening one can reveal where it lives. The 500 KB content limit was invisible to the editor: nothing in the web app imported it, so a long document simply started failing to save with a generic message, and because autosave only advances its saved marker on success, every further keystroke fired another full save that could not succeed. The editor now shows the count as it approaches the limit, says plainly when it is past it, and autosave refuses to fire a save it knows the server will reject, picking the draft back up the moment it fits again. Also adds the test timeout flag to apps/web, which was the last package still running at the 5000ms default and failing under contention.
…sues The project page was one long scroll: summary, health, progress, milestones, updates and issues all stacked, so finding the issue list meant scrolling past everything else and the page loaded all of it whether or not you wanted it. It is three routes now under a shared layout that keeps the header, health and progress in place. Overview keeps the summary and milestones, Activity holds the status updates, and Issues gets the full filtered list with the same view controls the team boards use, fetching only when that tab is open. This resumes work that had been stashed mid-edit rather than redoing it: the stashed layout had a duplicated header element that left the JSX unbalanced, which is presumably why it was set aside, and the issue list it referenced needed a project scoped query that had never been written. Both are in place.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe change adds project routes and issue views, separates issue facets from summaries, updates issue detail editing and prefetching, and makes document editing always writable with autosave validation and collapsible trees. Bun tests receive a longer timeout. ChangesProject surfaces
Issue facets and detail
Document workflows
Test configuration
Estimated code review effort: 5 (Critical) | ~90 minutes Sequence Diagram(s)sequenceDiagram
participant ProjectIssuesPage
participant ProjectIssues
participant useProjectIssues
participant projectIssuesSearch
ProjectIssuesPage->>ProjectIssues: pass projectId and projectName
ProjectIssues->>useProjectIssues: request project issues
useProjectIssues->>projectIssuesSearch: build project-scoped query
projectIssuesSearch-->>useProjectIssues: return serialized query
useProjectIssues-->>ProjectIssues: return paginated issues
ProjectIssues-->>ProjectIssuesPage: render list or board
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (6)
apps/web/src/features/docs/doc-tree.tsx (1)
177-185: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
rowHoverfor the folder toggle.Line 184 adds raw
transition-colorsandhover:*classes. Replace them withrowHoverso the control uses the shared interaction tokens and motion policy.As per coding guidelines, use shared interaction tokens for color transitions. Based on learnings, use
rowHoverinstead of raw Tailwind color-transition classes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/docs/doc-tree.tsx` around lines 177 - 185, Update the folder toggle button in the document tree to use the shared rowHover interaction token instead of the raw transition-colors and hover:bg-surface-2 hover:text-text classes. Preserve the existing layout, positioning, and accessibility attributes while adopting rowHover’s shared motion and color behavior.Sources: Coding guidelines, Learnings
apps/web/src/features/docs/use-autosave.test.ts (1)
3-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse workspace aliases for local test imports.
apps/web/src/features/docs/use-autosave.test.ts#L3-L3: importuseAutosavethrough@/features/docs/use-autosave.ts.apps/web/src/features/docs/doc-tree.test.tsx#L5-L5: importDocTree,docTreeOf, andancestorsOfthrough@/features/docs/doc-tree.tsx.As per coding guidelines, “inside
apps/web, use@/for local imports.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/docs/use-autosave.test.ts` at line 3, Replace the local relative import in apps/web/src/features/docs/use-autosave.test.ts:3 with the `@/features/docs/use-autosave.ts` workspace alias. Also update the DocTree, docTreeOf, and ancestorsOf import in apps/web/src/features/docs/doc-tree.test.tsx:5 to use `@/features/docs/doc-tree.tsx`.Source: Coding guidelines
apps/web/src/app/(app)/projects/[slug]/layout.tsx (1)
23-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the shared
formatDatehelper.
formatDateis now duplicated in this file,apps/web/src/app/(app)/projects/[slug]/page.tsx(lines 12-19), andapps/web/src/app/(app)/projects/[slug]/activity/page.tsx(lines 18-25). Move it into a shared module, for example@/features/projects/format.ts, and import it in the three routes. The locale is also hardcoded toen-GB, so a single source keeps the format consistent when localization changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/app/`(app)/projects/[slug]/layout.tsx around lines 23 - 30, Extract the duplicated formatDate helper into a shared projects formatting module, preserving its null handling and en-GB date formatting. Remove the local definitions and import the shared formatDate in the project layout, project page, and activity page.apps/web/src/lib/query/issue-search.ts (1)
70-70: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueShare the project default query.
{ ...DEFAULT_ISSUE_QUERY, orderBy: 'updated' }is written here and again inuseProjectIssuesinapps/web/src/lib/query/use-issues.ts(line 175). Export one constant, for examplePROJECT_ISSUES_QUERY, and use it in both places so the two defaults cannot diverge.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/lib/query/issue-search.ts` at line 70, Define and export a shared PROJECT_ISSUES_QUERY constant containing the DEFAULT_ISSUE_QUERY values with orderBy set to updated, then replace the duplicated inline defaults in the issue-search query and useProjectIssues. Import and reuse this constant in both locations so their project issue defaults remain identical.apps/web/src/features/projects/project-issues.tsx (1)
99-101: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winSurface pagination failures.
fetchNextPage().catch(() => undefined)discards the error. If loading the next page fails, the list stops growing and the user gets no message. Report the error through the existing toast or error surface.Based on the coding guideline "must not silently swallow errors".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/projects/project-issues.tsx` around lines 99 - 101, Update the onLoadMore handler in the project issues component to stop silently swallowing fetchNextPage failures. Preserve the existing fetchNextPage call, but route its rejected error to the component’s established toast or error-reporting surface so users receive feedback when pagination fails.Source: Coding guidelines
apps/web/src/features/projects/project-tabs.tsx (1)
26-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTwo new tab-like controls write raw Tailwind transition classes. The shared root cause is that neither control uses the centralized interaction helpers, so duration and easing tokens are copied inline and can drift.
apps/web/src/features/projects/project-tabs.tsx#L26-L30: replace the inlinetransition-colorsandhover:text-mutedclasses withtabHoverfrom@/lib/interaction.ts.apps/web/src/features/projects/project-issues.tsx#L64-L68: replace the inlinetransition-colors duration-[var(--duration-fast)]classes withtabHoverfrom@/lib/interaction.ts.Based on the learning "prefer the shared hover/focus transition interaction helpers from
apps/web/src/lib/interaction.tsinstead of writing raw Tailwindtransition-colorsorhover:*classes. UsetabHoverfor tab-like controls".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/projects/project-tabs.tsx` around lines 26 - 30, Replace the raw transition and hover classes with the shared tabHover helper from `@/lib/interaction.ts` in apps/web/src/features/projects/project-tabs.tsx lines 26-30 and apps/web/src/features/projects/project-issues.tsx lines 64-68; import and apply tabHover to both tab-like controls while preserving their existing state-specific classes.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/app/`(app)/projects/[slug]/layout.tsx:
- Around line 35-36: Replace the unconditional getProjectDetail catch with
shared typed not-found handling: map only the domain not-found error from
`@orbit/shared/errors` to notFound(), and rethrow all other failures without
swallowing them. Apply this in
apps/web/src/app/(app)/projects/[slug]/layout.tsx#L35-L36,
apps/web/src/app/(app)/projects/[slug]/page.tsx#L21-L25,
apps/web/src/app/(app)/projects/[slug]/activity/page.tsx#L30-L31, and
apps/web/src/app/(app)/projects/[slug]/issues/page.tsx#L16-L17, preferably
through one shared loader helper.
In `@apps/web/src/features/docs/doc-tree.test.tsx`:
- Around line 78-116: Extend the “a folder that can be closed” tests with a
rendered DocRow/tree interaction covering the toggle flow, rather than only
testing docTreeOf and ancestorsOf. Locate the toggle by the doc-toggle-root
identifier, verify descendants initially render and aria-expanded is true, click
it to assert descendants disappear and aria-expanded becomes false, then click
again to confirm the descendants return.
In `@apps/web/src/features/docs/use-autosave.ts`:
- Around line 45-49: Update the pending-save completion handler in
apps/web/src/features/docs/use-autosave.ts#L45-L49 to re-evaluate
canSaveRef.current(valueRef.current) before selecting unsaved, retaining blocked
when the current value is invalid. Add the regression scenario in
apps/web/src/features/docs/use-autosave.test.ts#L40-L55 by keeping a valid save
pending, rerendering with an invalid value, resolving the save, and asserting
the status remains blocked.
In `@apps/web/src/features/projects/project-issues.tsx`:
- Around line 57-78: Update the toggle buttons in the layout selector mapped
from mode to expose selection with aria-pressed={layout === mode} and add the
project’s standard focus-visible ring classes to their className. Preserve the
existing click behavior and styling for selected and unselected layouts.
- Line 48: Update ProjectIssues team selection so it does not default to
workspace.teams[0]. Use the project-specific team ID when available; otherwise
make the team prop nullable and ensure Board/IssueList team-scheduled mutations
and other team-dependent actions are disabled or skipped when no team ID exists.
---
Nitpick comments:
In `@apps/web/src/app/`(app)/projects/[slug]/layout.tsx:
- Around line 23-30: Extract the duplicated formatDate helper into a shared
projects formatting module, preserving its null handling and en-GB date
formatting. Remove the local definitions and import the shared formatDate in the
project layout, project page, and activity page.
In `@apps/web/src/features/docs/doc-tree.tsx`:
- Around line 177-185: Update the folder toggle button in the document tree to
use the shared rowHover interaction token instead of the raw transition-colors
and hover:bg-surface-2 hover:text-text classes. Preserve the existing layout,
positioning, and accessibility attributes while adopting rowHover’s shared
motion and color behavior.
In `@apps/web/src/features/docs/use-autosave.test.ts`:
- Line 3: Replace the local relative import in
apps/web/src/features/docs/use-autosave.test.ts:3 with the
`@/features/docs/use-autosave.ts` workspace alias. Also update the DocTree,
docTreeOf, and ancestorsOf import in
apps/web/src/features/docs/doc-tree.test.tsx:5 to use
`@/features/docs/doc-tree.tsx`.
In `@apps/web/src/features/projects/project-issues.tsx`:
- Around line 99-101: Update the onLoadMore handler in the project issues
component to stop silently swallowing fetchNextPage failures. Preserve the
existing fetchNextPage call, but route its rejected error to the component’s
established toast or error-reporting surface so users receive feedback when
pagination fails.
In `@apps/web/src/features/projects/project-tabs.tsx`:
- Around line 26-30: Replace the raw transition and hover classes with the
shared tabHover helper from `@/lib/interaction.ts` in
apps/web/src/features/projects/project-tabs.tsx lines 26-30 and
apps/web/src/features/projects/project-issues.tsx lines 64-68; import and apply
tabHover to both tab-like controls while preserving their existing
state-specific classes.
In `@apps/web/src/lib/query/issue-search.ts`:
- Line 70: Define and export a shared PROJECT_ISSUES_QUERY constant containing
the DEFAULT_ISSUE_QUERY values with orderBy set to updated, then replace the
duplicated inline defaults in the issue-search query and useProjectIssues.
Import and reuse this constant in both locations so their project issue defaults
remain identical.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a9b3617f-12dc-4c83-bc33-8fecb6c3d988
📒 Files selected for processing (14)
apps/web/package.jsonapps/web/src/app/(app)/projects/[slug]/activity/page.tsxapps/web/src/app/(app)/projects/[slug]/issues/page.tsxapps/web/src/app/(app)/projects/[slug]/layout.tsxapps/web/src/app/(app)/projects/[slug]/page.tsxapps/web/src/features/docs/doc-surface.tsxapps/web/src/features/docs/doc-tree.test.tsxapps/web/src/features/docs/doc-tree.tsxapps/web/src/features/docs/use-autosave.test.tsapps/web/src/features/docs/use-autosave.tsapps/web/src/features/projects/project-issues.tsxapps/web/src/features/projects/project-tabs.tsxapps/web/src/lib/query/issue-search.tsapps/web/src/lib/query/use-issues.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 439434a679
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Three things made the app feel slow, and one of them was visible as a blank panel for a second or more on every first click. Opening the peek ran a cold detail query, so it painted a skeleton for a whole round trip even though the board already held every field shown first. Seed the detail query from the row the list is already holding, so the title, description and properties are on screen immediately and only the activity and comments wait on the network. Hovering or focusing a card or row prefetches the detail, so the click usually lands on a warm cache. Measured against the seeded workspace, the panel is populated 175ms after the click instead of after a full request. Every filter change refetched a summary that fired thirteen aggregate queries, ten of which were computed over the scope and could not change when a filter changed. Split the scope wide facets into their own endpoint and cache entry, keyed by scope alone, so changing a filter no longer recomputes them, and collapse the seven column facets into a single grouping sets pass. A filter change now costs two queries instead of thirteen. Docs sat behind an Edit and Done toggle and the issue description had Cancel and Save buttons. Both surfaces are now always editable for anyone who can write, committing on blur and after a pause, with a quiet saved indicator as the only status. The doc keeps its collection, repo binding and updated line in edit mode, and its attachments, backlinks and comments now sit under the editor rather than disappearing. Two problems fell out of always editing, and both are fixed here. A second person holding a doc open would have clobbered edits they never saw, so the editor now adopts a newer version whenever the local draft has nothing unsaved, and holds its ground when it does. The rich text round trip also appended a trailing newline, which made merely opening a document look like an edit and write it straight back; the serialized markdown is now settled before it is compared, so an idle open writes nothing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Making the title and description always editable left them holding the values they were opened with, so a second person renaming an issue or rewriting its description would never show up, and the next keystroke would have written the stale copy back over it. Both fields now take the newer version whenever the local draft has nothing unsaved, and hold their ground while the author is mid sentence, matching what the doc editor already does. A new doc also no longer redirects through an edit flag that stopped meaning anything once the surface became always editable. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Warming the detail cache on pointer enter also fired while a card was being dragged across the board, and the work it kicked off was enough to unseat the drag sensor: the card never landed in the column it was dropped on. The end to end drag test caught it. Warm only when no button is held, which is every ordinary hover and none of a drag. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/web/src/features/docs/doc-editor.tsx (1)
237-276: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winRender the footer in Markdown mode.
Line 248 forwards
footeronly throughRichTextEditor. The Markdown branch at Lines 251-276 never renders it. Writable documents therefore hide attachments, backlinks, and comments after a user selects Markdown. Render the footer in both editor modes and add a Markdown-mode regression test.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/docs/doc-editor.tsx` around lines 237 - 276, The Markdown branch of the document editor currently omits the footer, unlike the RichTextEditor branch. Update the Markdown-mode layout in the component containing the mode conditional to render the existing footer alongside the MarkdownCodeEditor and preview, preserving the current rich-text behavior; add a regression test that verifies attachments, backlinks, and comments remain visible when Markdown mode is selected.
🧹 Nitpick comments (3)
apps/web/src/features/issues/issue-detail.tsx (1)
86-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared surface interaction token.
Replace the raw
transition-colors,hover:bg-surface-2, and focus color classes withsurfaceHover. This keeps hover behavior within the shared duration policy and applies the reduced-motion behavior consistently.As per coding guidelines, use shared interaction tokens for color transitions. Based on learnings, use
rowHover,cardHover, orsurfaceHoverinstead of raw Tailwind hover color transitions.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/issues/issue-detail.tsx` at line 86, Update the textarea class in the issue-detail component to replace the raw transition-colors, hover:bg-surface-2, and focus color classes with the shared surfaceHover interaction token. Preserve the existing layout, typography, and other styling classes.Sources: Coding guidelines, Learnings
apps/web/src/features/docs/doc-surface.tsx (1)
33-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
@/for the new local imports.The new relative imports bypass the application alias convention.
apps/web/src/features/docs/doc-surface.tsx#L33-L38: Import the document feature modules through@/features/docs/....apps/web/src/features/docs/doc-remote-edit.test.ts#L2-L2: ImportadoptsRemoteEditthrough@/features/docs/doc-surface.tsx.apps/web/src/features/docs/editor/rich-text-editor.test.tsx#L7-L7: Import the editor module through@/features/docs/editor/rich-text-editor.tsx.As per coding guidelines, inside
apps/webuse@/for local imports.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/docs/doc-surface.tsx` around lines 33 - 38, Replace the relative local imports in apps/web/src/features/docs/doc-surface.tsx lines 33-38 with `@/features/docs/`... imports; update the adoptsRemoteEdit import in apps/web/src/features/docs/doc-remote-edit.test.ts line 2 to use `@/features/docs/doc-surface.tsx`; and update the editor import in apps/web/src/features/docs/editor/rich-text-editor.test.tsx line 7 to use `@/features/docs/editor/rich-text-editor.tsx`.Source: Coding guidelines
apps/web/src/features/docs/doc-reader.tsx (1)
73-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared interaction helper for backlink hover state.
Line 75 adds a raw
transition-colorsclass and custom hover color. Replace these classes with the applicable shared interaction helper, such asrowHover. As per coding guidelines, use shared interaction tokens for color transitions. Based on learnings, userowHoverrather than raw Tailwind transition classes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/src/features/docs/doc-reader.tsx` around lines 73 - 76, Update the Link in the document reader to use the shared rowHover interaction helper for its hover and color-transition behavior, removing the raw transition-colors and custom hover:text-text classes while preserving the remaining layout and typography classes.Sources: Coding guidelines, Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/e2e/zz-verify-ux.spec.ts`:
- Around line 4-5: Replace the hard-coded SHOTS directory used by the screenshot
calls in the test with Playwright’s testInfo.outputPath(...) for each artifact.
Update the relevant test callback to access testInfo and pass a distinct output
path to the screenshot operations at the affected locations, removing the
developer-local absolute path.
In `@apps/web/src/app/`(app)/docs/[id]/page.tsx:
- Around line 10-11: Validate the awaited params.id in DocPage before using it
for hydration by applying the shared idSchema from
`@orbit/shared/validators/common` or the existing docPageParamsSchema. Handle
validation failures before calling downstream document-loading or dehydratedDoc
logic, and pass only the parsed nonempty ID onward.
In `@apps/web/src/features/issues/issue-detail.tsx`:
- Around line 81-83: Update the Escape handling and onBlur/commit flow in the
issue title editor so pressing Escape resets the draft without triggering
update.mutate; use a cancellation ref checked by onBlur or bypass commit
directly, and add a regression test covering title change followed by Escape
with no mutation.
In `@apps/web/src/features/issues/issue-peek-warm.test.tsx`:
- Around line 116-144: Replace the local Card in the test with the production
IssueCard or IssueRow component and configure it with the ENG-420 issue data.
Trigger pointer entry with buttons set to 1 and 0, asserting that the production
component does not prefetch during a drag and does prefetch for a non-drag
entry; ensure the test exercises the actual prefetch handler rather than
duplicating its guard.
---
Outside diff comments:
In `@apps/web/src/features/docs/doc-editor.tsx`:
- Around line 237-276: The Markdown branch of the document editor currently
omits the footer, unlike the RichTextEditor branch. Update the Markdown-mode
layout in the component containing the mode conditional to render the existing
footer alongside the MarkdownCodeEditor and preview, preserving the current
rich-text behavior; add a regression test that verifies attachments, backlinks,
and comments remain visible when Markdown mode is selected.
---
Nitpick comments:
In `@apps/web/src/features/docs/doc-reader.tsx`:
- Around line 73-76: Update the Link in the document reader to use the shared
rowHover interaction helper for its hover and color-transition behavior,
removing the raw transition-colors and custom hover:text-text classes while
preserving the remaining layout and typography classes.
In `@apps/web/src/features/docs/doc-surface.tsx`:
- Around line 33-38: Replace the relative local imports in
apps/web/src/features/docs/doc-surface.tsx lines 33-38 with `@/features/docs/`...
imports; update the adoptsRemoteEdit import in
apps/web/src/features/docs/doc-remote-edit.test.ts line 2 to use
`@/features/docs/doc-surface.tsx`; and update the editor import in
apps/web/src/features/docs/editor/rich-text-editor.test.tsx line 7 to use
`@/features/docs/editor/rich-text-editor.tsx`.
In `@apps/web/src/features/issues/issue-detail.tsx`:
- Line 86: Update the textarea class in the issue-detail component to replace
the raw transition-colors, hover:bg-surface-2, and focus color classes with the
shared surfaceHover interaction token. Preserve the existing layout, typography,
and other styling classes.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9df8dd5b-2fe0-47a7-a1f7-177a204c7ee3
📒 Files selected for processing (34)
apps/web/e2e/docs.spec.tsapps/web/e2e/zz-verify-ux.spec.tsapps/web/src/app/(app)/docs/[id]/page.tsxapps/web/src/app/api/issues/facets/route.tsapps/web/src/features/docs/doc-editor.tsxapps/web/src/features/docs/doc-reader.tsxapps/web/src/features/docs/doc-remote-edit.test.tsapps/web/src/features/docs/doc-surface.tsxapps/web/src/features/docs/editor/rich-text-editor.test.tsxapps/web/src/features/docs/editor/rich-text-editor.tsxapps/web/src/features/docs/new-doc.tsxapps/web/src/features/filters/filter-bar.tsxapps/web/src/features/filters/filter-fields.test.tsxapps/web/src/features/filters/filter-fields.tsxapps/web/src/features/filters/filter-menu.tsxapps/web/src/features/issues/board.test.tsxapps/web/src/features/issues/issue-card.tsxapps/web/src/features/issues/issue-detail.tsxapps/web/src/features/issues/issue-list.test.tsxapps/web/src/features/issues/issue-peek-warm.test.tsxapps/web/src/features/issues/issue-peek.tsxapps/web/src/features/issues/issue-row.test.tsxapps/web/src/features/issues/issue-row.tsxapps/web/src/features/issues/my-issues-view.test.tsxapps/web/src/features/issues/use-issue-view-model.tsapps/web/src/lib/query/issue-search.test.tsapps/web/src/lib/query/issue-search.tsapps/web/src/lib/query/keys.tsapps/web/src/lib/query/schemas.tsapps/web/src/lib/query/use-issues.tsapps/web/src/lib/realtime/delta-bridge.test.tsxapps/web/src/lib/realtime/delta-bridge.tsxpackages/core/src/work/issue-service.test.tspackages/core/src/work/issue-service.ts
Greptile found two that would have shipped as silent staleness. The project Issues tab keyed its cache under the project id in the slot the realtime reconciler reads as a team id, so every delta for a project issue was rejected and the tab stayed stale until a reload; project lists now carry their own scope and the reconciler matches on project id. The doc tree kept a folder collapsed even when the reader navigated into a document inside it through search or a direct link, so the open document was invisible in the sidebar; opening a document now reveals the chain above it, while an explicit collapse afterwards still sticks. CodeRabbit found four more. Every project route turned any failure from getProjectDetail into a 404, so a permission error or a database outage read as "no such project"; only a missing or forbidden project maps to notFound now and everything else propagates. Autosave downgraded a blocked draft back to unsaved when an earlier in flight save landed, which invited a save that could not succeed. The project view picked whichever workspace team happened to be first as the team for its board; it now uses the team the project's issues actually share. The layout toggle announced nothing to a screen reader and had no focus ring. The doc tree and autosave fixes come with tests that fail without them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
It was a throwaway probe used to measure how long the peek takes to paint and to confirm the docs surface no longer shows a save button. It wrote screenshots to an absolute path outside the repository and duplicated a sign-in helper, so it has no business in the suite. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Escape reset the draft and blurred the field, but blur runs the commit, and the commit read the draft from the render that had not yet been replaced. Pressing Escape after typing therefore saved the very edit the user was throwing away. Blur now knows an edit was abandoned and stays quiet. The hover prefetch tests were rewritten to drive IssueCard and IssueRow themselves rather than a copy of their handler, so removing the guard that keeps a drag undisturbed fails them. Both new suites were checked against the unfixed code. The docs page also parses its route parameter before handing it to the hydration prefetch, instead of trusting whatever the URL carried. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…sits A delta that arrived for a row already on screen was written back at the index it happened to occupy. Ordering by priority and watching someone else raise an issue to urgent left it sitting at the bottom until the next refetch. The insert path already sorted; the update path did not. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
@coderabbitai full review |
|
The test asserted that the moved issue had a state id, which is true of every issue including one that never moved, then reloaded straight away. On a slow runner the reload cancelled the move request that was still in flight, so the card came back in Todo and the test failed on the wrong assertion, several lines after the one that should have caught it. It now reads the target state id from bootstrap and polls until the server reports the issue in it, so the reload only happens once the move has actually landed, and a move that never persists fails the assertion that is about persistence. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Revealing the chain above the open document ran on every change to the docs array, not only when the open document changed. Collapsing the folder you are reading inside therefore lasted until the next refetch, which then reopened it with nobody having touched anything. It now runs once per document opened, and waits until the document is actually in the list so an early render with nothing loaded does not count as having revealed it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
@coderabbitai review |
|
…rning The marker that stops the reveal from rerunning on every docs refresh kept the last document id even after navigating away from docs entirely. Collapsing its folder while elsewhere and then coming back left the open document hidden. Leaving now clears the marker. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Follow-up to #89, working through the rest of the backlog.
Docs
Folders close now. The tree nested correctly but had no disclosure, so a workspace with a deep handbook rendered every descendant at once and scrolling was the only navigation. Rows with children get a control, closing one hides its branch and leaves siblings alone, and the builder reports a child count so leaves get no control.
ancestorsOfnames the chain above a doc so opening one can reveal where it lives.The 500 KB limit was invisible. Nothing in the web app imported it, so a long document just started failing to save with a generic message — and because autosave only advances its saved marker on success, every further keystroke fired another full save that could not succeed. The editor shows the count as it approaches the limit, says plainly when it is past it, and autosave refuses to fire a save it knows will be rejected, picking the draft back up the moment it fits again.
Inbox
Selection was an index into the filtered list, so a notification arriving above the one being read moved the pane onto something else, and a shrinking list left the index past the end. It is keyed by notification id now.
The panes shared the shell's single scroll container, so a long list pushed the whole page down and the reading pane scrolled away with it. Each pane scrolls on its own. The entity a notification points at was read from the database and dropped by the mapping layer; it is carried through now, from both the initial load and the socket.
Projects
The project page was one long scroll. It is three routes under a shared layout that keeps the header, health and progress: Overview for summary and milestones, Activity for status updates, Issues for the filtered list with the same view controls the boards use, fetching only when that tab is open.
This resumes stashed work rather than redoing it. The stashed layout had a duplicated header element leaving the JSX unbalanced, which is presumably why it was set aside, and the issue list it referenced needed a project-scoped query that had never been written.
Also
apps/webwas the last package still running tests at the 5000ms default and failing under contention; it gets the timeout flag the others already had.Verification
bun run verifygreen, 11 e2e specs pass. New coverage for tree collapse and ancestry, autosave blocking and recovery, and inbox selection stability.Known, not fixed here
/docs/{id}logs a recoverable server-render error (document is not defined) and falls back to client rendering. TipTap already setsimmediatelyRender: false, the markdown sanitizer guardstypeof globalThis.document, and the scroll hooks are effect-only and guarded, so the usual suspects are ruled out. It needs a captured stack rather than more grepping, and is tracked separately.Greptile Summary
The PR adds collapsible documentation folders and document-size feedback, stabilizes inbox selection and scrolling, and divides project details into Overview, Activity, and Issues routes.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains; the previously reported project-cache scoping, realtime ordering, and document-tree reveal issues are fixed in the current code.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Docs[Docs workspace] --> Tree[Collapsible document tree] Docs --> Editor[Size-aware editor and autosave] Inbox[Inbox] --> Selection[ID-based selection] Inbox --> Panes[Independent scrolling panes] Project[Project layout] --> Overview[Overview] Project --> Activity[Activity] Project --> Issues[Issues] Issues --> Query[Project-scoped query] Query --> Realtime[Realtime reconciliation]Reviews (10): Last reviewed commit: "fix(docs): reveal a doc again after leav..." | Re-trigger Greptile