Skip to content

Docs folders and length limits, the inbox reading pane, and project tabs - #90

Merged
imshashank merged 12 commits into
mainfrom
docs-and-projects
Aug 5, 2026
Merged

imshashank merged 12 commits into
mainfrom
docs-and-projects

Conversation

@imshashank

@imshashank imshashank commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

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. ancestorsOf names 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/web was 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 verify green, 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 sets immediatelyRender: false, the markdown sanitizer guards typeof 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.

  • Adds ancestor-aware document-tree disclosure and autosave size-limit handling.
  • Preserves notification entities and ID-based inbox selection.
  • Introduces project tabs, project-scoped issue queries, filtering, and realtime cache reconciliation.
  • Extends focused unit and end-to-end coverage and raises the web test timeout.

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

Filename Overview
apps/web/src/features/docs/doc-tree.tsx Tracks one-time ancestor revelation per active document while preserving user collapses across refetches and resetting the marker when leaving a document route.
apps/web/src/lib/realtime/delta-bridge.tsx Distinguishes project-scoped caches from team caches and reconciles realtime issue deltas using project membership.
apps/web/src/lib/query/sync.ts Reconciles and re-sorts issue deltas according to every supported active ordering.
apps/web/src/lib/query/use-issues.ts Uses the revised project query-key and search representation for project issue lists.
apps/web/src/app/(app)/projects/[slug]/layout.tsx Provides the shared project header, progress visualization, and tab navigation for the new nested routes.
packages/core/src/work/issue-service.ts Adds project-filtered issue retrieval and facet aggregation without an accepted follow-up finding.

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]
Loading

Reviews (10): Last reviewed commit: "fix(docs): reveal a doc again after leav..." | Re-trigger Greptile

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.
@vercel

vercel Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orbit Ready Ready Preview Aug 5, 2026 11:22am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Project surfaces

Layer / File(s) Summary
Project shell and overview
apps/web/src/app/(app)/projects/[slug]/layout.tsx, apps/web/src/app/(app)/projects/[slug]/page.tsx, apps/web/src/features/projects/project-tabs.tsx
The project layout adds metadata, summary UI, progress data, charts, and tabs. The overview page renders descriptions and milestones.
Project issue query and rendering
apps/web/src/lib/query/issue-search.ts, apps/web/src/lib/query/use-issues.ts, apps/web/src/features/projects/project-issues.tsx, apps/web/src/app/(app)/projects/[slug]/issues/page.tsx
Project-scoped issue queries support filtering, pagination, list and board layouts, counts, and empty states.
Project activity route
apps/web/src/app/(app)/projects/[slug]/activity/page.tsx
The activity route renders authorized update composition, update cards, and an empty state.

Issue facets and detail

Layer / File(s) Summary
Facet service and query flow
packages/core/src/work/issue-service.ts, apps/web/src/app/api/issues/facets/route.ts, apps/web/src/lib/query/*
Issue summaries no longer include facets. A separate facet service, API route, schema, cache, and query hook provide facet counts and scope totals.
Facet consumers and invalidation
apps/web/src/features/issues/use-issue-view-model.ts, apps/web/src/features/filters/*, apps/web/src/lib/realtime/delta-bridge.tsx
Issue views and filters consume the dedicated facet type. Realtime issue changes invalidate summary and facet queries.
Issue detail editing and preview
apps/web/src/features/issues/issue-detail.tsx, apps/web/src/features/issues/issue-card.tsx, apps/web/src/features/issues/issue-row.tsx, apps/web/src/lib/query/use-issues.ts
Issue details support known-data previews, prefetching, inline title editing, autosaved descriptions, and placeholder-aware activity rendering.

Document workflows

Layer / File(s) Summary
Always-editable document surface
apps/web/src/app/(app)/docs/[id]/page.tsx, apps/web/src/features/docs/doc-surface.tsx, apps/web/src/features/docs/doc-reader.tsx, apps/web/src/features/docs/new-doc.tsx
Writable documents render editing sessions without an edit-mode toggle. Context, attachments, backlinks, comments, and save status are integrated into the document surface.
Autosave validation and rich editor behavior
apps/web/src/features/docs/use-autosave.ts, apps/web/src/features/docs/editor/rich-text-editor.tsx, apps/web/src/features/docs/doc-editor.tsx
Autosave blocks invalid content. The editor supports blur callbacks, footer content, normalized Markdown, and content-limit feedback.
Collapsible document tree
apps/web/src/features/docs/doc-tree.tsx
The document tree supports collapsed folders, child counts, accessible toggles, and ancestor lookup.

Test configuration

Layer / File(s) Summary
Bun test timeout
apps/web/package.json
The web test script uses a 20-second Bun timeout.

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
Loading

Possibly related PRs

  • Noveum/orbit#88: Updates the same issue summary, facet, query, filter, and service APIs.
  • Noveum/orbit#40: Overlaps in the document editor and document tree implementations.
  • Noveum/orbit#36: Modifies the same issue detail view behavior.

Suggested reviewers: pulkitxm

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes major changes across documentation, inbox, and project navigation.
Description check ✅ Passed The description directly explains the documentation, inbox, project, issue, testing, and verification changes.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-and-projects

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread apps/web/src/lib/query/use-issues.ts Resolved
Comment thread apps/web/src/features/docs/doc-tree.tsx Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (6)
apps/web/src/features/docs/doc-tree.tsx (1)

177-185: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use rowHover for the folder toggle.

Line 184 adds raw transition-colors and hover:* classes. Replace them with rowHover so 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 rowHover instead 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 value

Use workspace aliases for local test imports.

  • apps/web/src/features/docs/use-autosave.test.ts#L3-L3: import useAutosave through @/features/docs/use-autosave.ts.
  • apps/web/src/features/docs/doc-tree.test.tsx#L5-L5: import DocTree, docTreeOf, and ancestorsOf through @/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 win

Extract the shared formatDate helper.

formatDate is now duplicated in this file, apps/web/src/app/(app)/projects/[slug]/page.tsx (lines 12-19), and apps/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 to en-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 value

Share the project default query.

{ ...DEFAULT_ISSUE_QUERY, orderBy: 'updated' } is written here and again in useProjectIssues in apps/web/src/lib/query/use-issues.ts (line 175). Export one constant, for example PROJECT_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 win

Surface 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 win

Two 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 inline transition-colors and hover:text-muted classes with tabHover from @/lib/interaction.ts.
  • apps/web/src/features/projects/project-issues.tsx#L64-L68: replace the inline transition-colors duration-[var(--duration-fast)] classes with tabHover from @/lib/interaction.ts.

Based on the learning "prefer the shared hover/focus transition interaction helpers from apps/web/src/lib/interaction.ts instead of writing raw Tailwind transition-colors or hover:* classes. Use tabHover for 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

📥 Commits

Reviewing files that changed from the base of the PR and between b9b2f9c and 439434a.

📒 Files selected for processing (14)
  • apps/web/package.json
  • apps/web/src/app/(app)/projects/[slug]/activity/page.tsx
  • apps/web/src/app/(app)/projects/[slug]/issues/page.tsx
  • apps/web/src/app/(app)/projects/[slug]/layout.tsx
  • apps/web/src/app/(app)/projects/[slug]/page.tsx
  • apps/web/src/features/docs/doc-surface.tsx
  • apps/web/src/features/docs/doc-tree.test.tsx
  • apps/web/src/features/docs/doc-tree.tsx
  • apps/web/src/features/docs/use-autosave.test.ts
  • apps/web/src/features/docs/use-autosave.ts
  • apps/web/src/features/projects/project-issues.tsx
  • apps/web/src/features/projects/project-tabs.tsx
  • apps/web/src/lib/query/issue-search.ts
  • apps/web/src/lib/query/use-issues.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread apps/web/src/lib/query/use-issues.ts Resolved
Comment thread apps/web/src/features/docs/doc-tree.tsx Resolved
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]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Render the footer in Markdown mode.

Line 248 forwards footer only through RichTextEditor. 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 win

Use the shared surface interaction token.

Replace the raw transition-colors, hover:bg-surface-2, and focus color classes with surfaceHover. 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, or surfaceHover instead 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 win

Use @/ 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: Import adoptsRemoteEdit through @/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/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/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 win

Use the shared interaction helper for backlink hover state.

Line 75 adds a raw transition-colors class and custom hover color. Replace these classes with the applicable shared interaction helper, such as rowHover. As per coding guidelines, use shared interaction tokens for color transitions. Based on learnings, use rowHover rather 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

📥 Commits

Reviewing files that changed from the base of the PR and between 439434a and 4588026.

📒 Files selected for processing (34)
  • apps/web/e2e/docs.spec.ts
  • apps/web/e2e/zz-verify-ux.spec.ts
  • apps/web/src/app/(app)/docs/[id]/page.tsx
  • apps/web/src/app/api/issues/facets/route.ts
  • apps/web/src/features/docs/doc-editor.tsx
  • apps/web/src/features/docs/doc-reader.tsx
  • apps/web/src/features/docs/doc-remote-edit.test.ts
  • apps/web/src/features/docs/doc-surface.tsx
  • apps/web/src/features/docs/editor/rich-text-editor.test.tsx
  • apps/web/src/features/docs/editor/rich-text-editor.tsx
  • apps/web/src/features/docs/new-doc.tsx
  • apps/web/src/features/filters/filter-bar.tsx
  • apps/web/src/features/filters/filter-fields.test.tsx
  • apps/web/src/features/filters/filter-fields.tsx
  • apps/web/src/features/filters/filter-menu.tsx
  • apps/web/src/features/issues/board.test.tsx
  • apps/web/src/features/issues/issue-card.tsx
  • apps/web/src/features/issues/issue-detail.tsx
  • apps/web/src/features/issues/issue-list.test.tsx
  • apps/web/src/features/issues/issue-peek-warm.test.tsx
  • apps/web/src/features/issues/issue-peek.tsx
  • apps/web/src/features/issues/issue-row.test.tsx
  • apps/web/src/features/issues/issue-row.tsx
  • apps/web/src/features/issues/my-issues-view.test.tsx
  • apps/web/src/features/issues/use-issue-view-model.ts
  • apps/web/src/lib/query/issue-search.test.ts
  • apps/web/src/lib/query/issue-search.ts
  • apps/web/src/lib/query/keys.ts
  • apps/web/src/lib/query/schemas.ts
  • apps/web/src/lib/query/use-issues.ts
  • apps/web/src/lib/realtime/delta-bridge.test.tsx
  • apps/web/src/lib/realtime/delta-bridge.tsx
  • packages/core/src/work/issue-service.test.ts
  • packages/core/src/work/issue-service.ts

Comment thread apps/web/e2e/zz-verify-ux.spec.ts Resolved
imshashank and others added 2 commits August 5, 2026 16:13
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]>
@imshashank

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 39 minutes.

Comment thread apps/web/src/features/docs/doc-tree.tsx Resolved
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]>
@imshashank

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment thread apps/web/src/features/docs/doc-tree.tsx Resolved
…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]>

This branch was successfully deployed

1 active deployment
Preview — 50c0c546 Deployed Aug 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant