Skip to content

feat(issues): realtime issue board, list, detail and comments - #11

Merged
pulkitxm merged 8 commits into
mainfrom
feat/issues-ui
Jul 22, 2026
Merged

pulkitxm merged 8 commits into
mainfrom
feat/issues-ui

Conversation

@pulkitxm

Copy link
Copy Markdown
Member

Adds the issue tracking UI end to end: REST routes over the core services, an optimistic TanStack Query layer that patches the cache from the realtime stream, and the board, list, issue detail, comments and quick create surfaces.

pulkitxm added 6 commits July 23, 2026 01:26
Adds a comment service to the domain layer, thin REST handlers that resolve a
Principal and publish deltas, a gated development sign in endpoint, and fixes
the realtime server so it accepts the batched delta payload the publisher sends.
…he patching

TanStack Query with a typed fetch wrapper, zod validated responses, optimistic
issue and comment mutations, and a delta bridge that patches the cache in place
while suppressing the viewer's own echoes and out of order sync ids.
Board columns with dnd-kit drag and drop, a virtualized keyboard driven list with
bulk edit and peek, an issue detail page with an editable description, a property
rail on single key shortcuts, threaded comments with reactions and mentions, and
live viewer presence.
Adds React Testing Library coverage for the board card and drop planner, the list
row and grouping, the comment composer with mention autocomplete, and a Playwright
spec that drives two browser contexts through create, drag, comment and reaction.
Uses the shared apiContext helper for the file routes after rebasing on main.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 744be649-4ead-4b00-96fa-b55ceac51beb

📥 Commits

Reviewing files that changed from the base of the PR and between 2a31e2c and 9c3e018.

📒 Files selected for processing (26)
  • apps/realtime/src/server.ts
  • apps/web/src/app/(app)/layout.tsx
  • apps/web/src/app/(auth)/login/page.tsx
  • apps/web/src/app/api/bootstrap/route.ts
  • apps/web/src/app/api/comments/route.ts
  • apps/web/src/app/api/dev/sign-in/route.ts
  • apps/web/src/app/api/files/[...key]/route.ts
  • apps/web/src/app/api/issues/[id]/subscribe/route.ts
  • apps/web/src/components/auth/dev-sign-in.tsx
  • apps/web/src/components/ui/dropdown-menu.tsx
  • apps/web/src/features/comments/comment-composer.test.tsx
  • apps/web/src/features/comments/comment-composer.tsx
  • apps/web/src/features/issues/bulk-edit-bar.tsx
  • apps/web/src/features/issues/issue-detail.tsx
  • apps/web/src/features/issues/issue-row.tsx
  • apps/web/src/features/issues/property-menu.tsx
  • apps/web/src/features/issues/quick-create.tsx
  • apps/web/src/features/issues/workspace-provider.tsx
  • apps/web/src/lib/api/content-disposition.test.ts
  • apps/web/src/lib/api/content-disposition.ts
  • apps/web/src/lib/api/dev-login.test.ts
  • apps/web/src/lib/api/dev-login.ts
  • apps/web/src/lib/api/dev-users.ts
  • apps/web/uploads/org_noveum_demo/2026/07/01KY5PY2J04300Z0YGW3RD2S3W-note.txt
  • packages/core/src/content/comment-service.ts
  • packages/shared/src/validators/index.ts
📝 Walkthrough

Walkthrough

This change adds an issue workspace with board/list views, issue and comment APIs, reactions, attachments, React Query caching, realtime synchronization, development sign-in, and Playwright end-to-end coverage.

Changes

Issue workspace and collaboration

Layer / File(s) Summary
Query contracts and cache primitives
apps/web/src/lib/query/*
Adds Zod domain schemas, typed API fetching, query keys, React Query provider setup, optimistic issue/comment mutations, and delta reconciliation helpers.
Issue, comment, reaction, and attachment services
packages/core/src/content/*, apps/web/src/app/api/*
Adds comment and reaction persistence with authorization and sync actions, plus issue, bootstrap, subscription, attachment, file, and comment route handlers.
Realtime delta delivery and cache bridging
apps/realtime/src/server.ts, apps/web/src/lib/realtime/*
Supports batched realtime delta payloads and applies issue, comment, and reaction actions to React Query caches.
Workspace, board, list, and issue detail UI
apps/web/src/features/issues/*, apps/web/src/app/\(app\)/*
Adds workspace context, team routes, board drag-and-drop, virtualized issue lists, bulk editing, quick creation, issue detail editing, property menus, and display glyphs.
Comments, mentions, and viewer presence
apps/web/src/features/comments/*, apps/web/src/features/issues/activity-feed.tsx
Adds comment composition with mentions, timeline rendering, replies, editing, reactions, activity entries, and viewer presence heartbeats.
Development sign-in and application wiring
.env.example, apps/web/src/app/\(auth\)/*, apps/web/src/components/auth/*, apps/web/src/lib/api/dev-login.ts, apps/web/src/app/providers.tsx, apps/web/next.config.ts, apps/web/package.json, apps/web/playwright.config.ts, apps/web/tsconfig.json
Adds gated development sign-in, provider composition, Turbopack root configuration, Playwright setup, and required scripts and packages.
Unit and end-to-end validation
apps/web/src/**/*.test.*, apps/web/e2e/*
Adds tests for fetcher errors, synchronization, comment mentions and timelines, issue rows/cards, board placement, and concurrent realtime issue workflows.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Author
  participant WebApp
  participant IssueAPI
  participant CommentAPI
  participant Realtime
  participant Watcher
  Author->>WebApp: create and move issue
  WebApp->>IssueAPI: create or move request
  IssueAPI->>Realtime: publish issue actions
  Realtime->>Watcher: deliver issue delta
  Author->>CommentAPI: submit comment or reaction
  CommentAPI->>Realtime: publish comment or reaction action
  Realtime->>Watcher: deliver collaboration delta
Loading
🚥 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
Title check ✅ Passed The title matches the main change set: issue board, list, detail, comments, and realtime updates.
Description check ✅ Passed The description clearly describes the issue tracking UI, realtime cache layer, and related routes/components.
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.

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

@pulkitxm

Copy link
Copy Markdown
Member Author

Driven end to end in a real browser

Two Chromium contexts signed in as different seeded users ([email protected] and [email protected]) against the dev server on 3011, the realtime server, Postgres and Redis. Every screenshot below is from that run.

Board

Columns are the team's workflow states in category order, each with a count and a status glyph. Cards carry the identifier, priority glyph, labels, estimate and assignee.

Engineering board

Quick create with C

Title first, description, then property chips. Cmd+Enter creates.

Quick create modal

The new issue reaches the second viewer with no reload

Left: the author's board right after creating. Right: the other browser context, patched in place from the realtime delta.

Author sees the new issue

Second viewer sees the new issue

Drag between columns

The card lifts on grab and settles in 140ms, transform and opacity only, writing through POST /api/issues/:id/move optimistically.

Card mid drag

Card dropped in In Progress

The second viewer sees the same move live:

Second viewer sees the move

Issue detail, comments and reactions

Markdown description rendered through @orbit/services/markdown, a property rail where every control has a single key shortcut, an activity feed interleaved with comments, and @mention autocomplete in the composer.

Comment posted

The other viewer reacts:

Second viewer reacts

And the author sees the reaction count and the viewer presence avatar appear without reloading:

Reaction arrives live

List view

Grouped by status with sticky headers, virtualized 28px rows, J/K to move, X to select, Space to peek, Enter to open, Cmd+B to toggle to the board.

List with bulk edit

Checks

pnpm verify is green: lint, comment policy, typecheck and 393 unit tests across the workspace, 109 of them in apps/web. The Playwright spec in apps/web/e2e/issues.spec.ts replays the whole two viewer flow in 7 seconds.

A comment or description that arrives over the realtime stream carries raw
markdown and no sanitized html, so both surfaces now fall back to plain text
instead of rendering an empty block, and the reaction toggle no longer refetches
the list the viewer is reading.

@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: 20

🧹 Nitpick comments (8)
apps/web/src/features/issues/property-menu.tsx (1)

28-28: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Tighten children to a single trigger element. DropdownMenuTrigger uses asChild, so ReactNode still allows strings or arrays that break composition and keyboard behavior. Switch this prop to ReactElement so consumers must pass one ref-forwarding trigger element. apps/web/src/features/issues/property-menu.tsx:28

🤖 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/property-menu.tsx` at line 28, Update the
children prop declaration in the property menu component from ReactNode to
ReactElement so DropdownMenuTrigger’s asChild composition always receives a
single trigger element; preserve the existing trigger behavior and ensure the
corresponding ReactElement type is imported.

Source: MCP tools

apps/web/src/lib/query/use-issues.ts (1)

224-228: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Validate the DELETE response with deletedSchema instead of issueEnvelopeSchema.partial().

The /api/issues/[id] DELETE handler returns { deleted: true }, but this validates against issueEnvelopeSchema.partial(), which makes issue optional and therefore parses { deleted: true } without asserting anything. Use the purpose-built deletedSchema so the response contract is actually enforced.

♻️ Proposed fix
-import {
-  bootstrapSchema,
-  issueDetailSchema,
-  issueEnvelopeSchema,
-  issueListSchema,
-  issueMoveResultSchema,
-} from './schemas.ts';
+import {
+  bootstrapSchema,
+  deletedSchema,
+  issueDetailSchema,
+  issueEnvelopeSchema,
+  issueListSchema,
+  issueMoveResultSchema,
+} from './schemas.ts';
     mutationFn: async (issue: Issue): Promise<void> => {
-      await apiFetch(`/api/issues/${issue.id}`, issueEnvelopeSchema.partial(), {
+      await apiFetch(`/api/issues/${issue.id}`, deletedSchema, {
         method: 'DELETE',
       });
     },
🤖 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/use-issues.ts` around lines 224 - 228, Update the
DELETE request in the mutationFn for issue deletion to validate the API response
with deletedSchema instead of issueEnvelopeSchema.partial(). Preserve the
existing DELETE method and request flow while enforcing the handler’s { deleted:
true } response contract.
apps/web/src/app/api/issues/[id]/subscribe/route.ts (1)

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

Prefer a shared validator for request input.

subscribeSchema is defined locally. The guideline expects route input schemas to come from @orbit/shared; move this (or the subscribed boolean validator) into the shared validators package for consistency and reuse.

As per coding guidelines: "Every route handler must parse request input with a Zod schema imported from @orbit/shared; never trust request bodies."

🤖 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/api/issues/`[id]/subscribe/route.ts at line 5, Move the
subscribed request validator from the local subscribeSchema definition into the
shared validators exported by `@orbit/shared`, then import and use that shared Zod
schema in the route handler. Ensure the handler continues parsing request bodies
through the shared schema and preserves the default subscribed=true behavior.

Source: Coding guidelines

apps/web/src/app/api/bootstrap/route.ts (1)

25-34: 🚀 Performance & Scalability | 🔵 Trivial

Per-team fan-out queries for states/cycles.

listWorkflowStates/listCycles are invoked once per team via Promise.all(teams.map(...)), so bootstrap issues O(teams) concurrent round trips rather than a single batched query. Fine for small team counts, but worth a batched query (e.g. inArray(teamId, ...)) if organizations can have many teams.

🤖 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/api/bootstrap/route.ts` around lines 25 - 34, Update the
bootstrap query flow to batch workflow states and cycles across all team IDs
instead of invoking listWorkflowStates and listCycles once per team. Add or
reuse batched query methods that accept the collected team IDs (for example,
using an inArray team filter), then use those methods in the Promise.all block
while preserving the existing states and cycles results.
apps/realtime/src/server.ts (1)

115-119: 🚀 Performance & Scalability | 🔵 Trivial

Nested loop scales with actions × connections.

Each queued delta batch now iterates every connection per action, so a large batch with many active connections runs more comparisons per Redis message than before. Given this executes synchronously in the pub/sub message handler, very large batches under high connection counts could add latency to delta fan-out. Worth keeping an eye on batch size limits (DELTA_BATCH_WINDOW_MS) relative to connection counts in production.

🤖 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/realtime/src/server.ts` around lines 115 - 119, The delta fan-out in the
parsed.data loop performs an actions-by-connections scan synchronously; reduce
this work by restructuring batching or indexing so each connection is matched
against the batch efficiently while preserving per-action scope and organization
filtering and queueDelta behavior. Review the relationship between parsed.data
handling and DELTA_BATCH_WINDOW_MS, and ensure batch sizing remains bounded to
prevent large pub/sub messages from causing excessive handler latency.
apps/web/src/features/issues/bulk-edit-bar.tsx (1)

24-26: 🚀 Performance & Scalability | 🔵 Trivial

Consider a batch update endpoint for large selections.

Firing one mutation per selected issue scales linearly with selection size; for large bulk selections this means many concurrent writes/sync_id increments/Redis publishes. Worth evaluating a dedicated batch-update endpoint if bulk selections commonly exceed a handful of issues.

🤖 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/bulk-edit-bar.tsx` around lines 24 - 26, Update
the bulk-edit flow around applyToAll to use a dedicated batch-update mutation or
endpoint for the selected issues instead of calling update.mutate once per
issue. Pass the shared patch and issue collection through the batch API,
preserving the current patch behavior while consolidating writes, sync updates,
and publishes.
apps/web/src/features/issues/priority-glyph.tsx (1)

6-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Loosely-typed lookup tables lose type safety against the shared Priority union.

TONE and FILLED_BARS are typed Record<number, string>/Record<number, number> rather than Record<Priority, ...>, and priorityLabel casts with priority as Priority. If PRIORITIES in @orbit/shared/constants ever gains/changes a value, TypeScript won't flag a missing entry here — it'll silently fall through to the ?? TONE[0]/?? 0 fallback rather than raising a compile error.

As per coding guidelines, **/*.{ts,tsx} should "use strict TypeScript" and avoid unchecked casts where a safer alternative exists.

♻️ Type the lookup tables against `Priority`
-const TONE: Record<number, string> = {
+const TONE: Record<Priority, string> = {
 };

-const FILLED_BARS: Record<number, number> = { 0: 0, 1: 3, 2: 3, 3: 2, 4: 1 };
+const FILLED_BARS: Record<Priority, number> = { 0: 0, 1: 3, 2: 3, 3: 2, 4: 1 };

 export function priorityLabel(priority: number): string {
-  return PRIORITY_LABELS[priority as Priority] ?? 'No priority';
+  return PRIORITY_LABELS[priority as Priority] ?? 'No priority';
 }
🤖 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/priority-glyph.tsx` around lines 6 - 18, Type
the TONE and FILLED_BARS lookup tables against the shared Priority union so
every priority value requires an explicit entry. Update priorityLabel to use
Priority without the unchecked priority as Priority cast, preserving the
existing fallback behavior only where the input boundary still requires it.

Source: Coding guidelines

apps/web/src/features/issues/board.tsx (1)

154-168: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

DragOverlay drop animation doesn't respect prefers-reduced-motion.

The dropAnimation config always applies a 140ms transform animation regardless of the user's motion preference.

As per coding guidelines, apps/web/**/*.{css,tsx,jsx} must "respect prefers-reduced-motion" for motion.

♻️ Gate the drop animation behind the media query
+  const prefersReducedMotion =
+    typeof window !== 'undefined' &&
+    window.matchMedia('(prefers-reduced-motion: reduce)').matches;
+
   <DragOverlay
-    dropAnimation={{ duration: 140, easing: 'cubic-bezier(0.22,0.61,0.36,1)' }}
+    dropAnimation={
+      prefersReducedMotion ? null : { duration: 140, easing: 'cubic-bezier(0.22,0.61,0.36,1)' }
+    }
   >
🤖 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/board.tsx` around lines 154 - 168, Update the
DragOverlay dropAnimation configuration to respect the user's
prefers-reduced-motion setting: disable the 140ms drop animation when reduced
motion is requested, while preserving the existing animation for users without
that preference. Use the component's existing media-query or motion-preference
utilities if available.

Source: Coding guidelines

🤖 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/realtime/src/server.ts`:
- Around line 52-56: Update deltaPayloadSchema and the deliverDelta flow to
validate batched actions independently, retain valid actions, and skip malformed
elements instead of rejecting the entire batch. Preserve the existing
single-action normalization behavior while ensuring downstream delivery receives
each valid action individually.

In `@apps/web/src/app/`(app)/layout.tsx:
- Line 10: Remove the localhost fallback from the realtime URL configuration in
the layout and require NEXT_PUBLIC_REALTIME_URL to be explicitly set. Fail
immediately with a clear configuration error when it is missing, while
preserving the existing behavior when the environment variable is provided.

In `@apps/web/src/app/`(auth)/login/page.tsx:
- Line 35: Update the DevSignIn invocation in the login page to pass callbackUrl
?? '/my-issues' as its post-login destination, and ensure DevSignIn uses that
value after successful authentication instead of always redirecting to
/my-issues.

In `@apps/web/src/app/api/bootstrap/route.ts`:
- Line 14: Move the query schema used by the bootstrap route out of the inline
zod declaration and into `@orbit/shared`, adding or reusing an exported shared
validator for the optional team string with the same maximum length. Update the
route handler to import and use that shared schema, and remove the local
querySchema definition and direct zod dependency.

In `@apps/web/src/app/api/dev/sign-in/route.ts`:
- Around line 10-22: Move the local signInSchema definition into the shared
validators package as exported devSignInSchema, including its inferred type if
needed, then import and use devSignInSchema in the POST handler’s parse call.
Remove the route-local schema while preserving the existing email validation
behavior.
- Around line 12-58: Add regression tests for the development-authentication
gate covering GET and POST returning 404 when devLoginEnabled is disabled, POST
rejecting an unknown user, and enabled POST returning success while forwarding
cookies from auth.api.magicLinkVerify. Exercise the route handlers GET and POST
and mock the relevant auth, database, and development-login dependencies so each
safeguard fails if broken.

In `@apps/web/src/app/api/files/`[...key]/route.ts:
- Around line 40-46: Harden the response construction in the file-serving route
by adding X-Content-Type-Options: nosniff and setting Content-Disposition to
attachment for stored content types that are not explicitly previewable.
Preserve inline serving only for the existing safe preview types, and ensure the
disposition filename remains appropriate for the requested file.

In `@apps/web/src/components/auth/dev-sign-in.tsx`:
- Line 52: Update the className on the affected sign-in control to remove
transition-colors, keeping the existing hover border and background states
instantaneous and preserving all other styling.

In `@apps/web/src/features/comments/comment-composer.tsx`:
- Around line 110-133: Add keyboard navigation to the mention suggestion flow
around the matches list and the composer’s onKeyDown handler: track the
highlighted member, move it with ArrowUp/ArrowDown, and select it with Enter or
Tab using pickMention. Expose the active option with appropriate
combobox/listbox semantics and styling while preserving mouse selection through
each suggestion button.
- Around line 78-85: Update onKeyDown so Escape first dismisses the open mention
popup and prevents composer cancellation; only call onCancel when no mention
popup is active. Use the existing mention-popup state or dismissal handler,
while preserving the current submit behavior for modified Enter.
- Around line 104-107: Update the onChange handler to guard the nullable
event.target.selectionStart before passing it to findMentionQuery. Use
event.target.value.length as the fallback caret position when selectionStart is
null, while preserving the existing setValue and mention-query update flow.

In `@apps/web/src/features/issues/bulk-edit-bar.tsx`:
- Around line 35-77: Update the bulk-edit bar’s Status, Priority, and Assignee
PropertyMenu selections to derive the shared value from the selected issues
instead of always passing an empty array. Compute a value only when every
selected issue has the same corresponding status, priority, or assignee, then
pass that value in the format expected by PropertyMenu while preserving the
existing applyToAll handlers.

In `@apps/web/src/features/issues/issue-detail.tsx`:
- Around line 62-69: Update toggleSubscribe to handle apiFetch failures with a
try/catch: retain the optimistic update on success, but restore the previous
subscription state when the request rejects and propagate a typed domain error
from `@orbit/shared/errors` rather than silently swallowing the failure. Ensure
the resulting rejection is handled by the existing caller or error boundary to
avoid an unhandled promise rejection.
- Around line 107-124: Prevent duplicate title updates in the Input handlers by
adding a ref-based guard shared by onKeyDown and onBlur. When Enter submits the
title, mark the blur as already handled before mutating and exiting edit mode;
have onBlur skip the mutation when that guard is set, while preserving normal
blur saves and Escape cancellation.

In `@apps/web/src/features/issues/issue-row.tsx`:
- Around line 46-53: Pass onFocus={onFocus} directly to the Checkbox in the
issue row, while preserving the existing wrapper handler and opacity behavior so
keyboard focus makes the checkbox visible.

In `@apps/web/src/features/issues/property-menu.tsx`:
- Around line 20-30: Update PropertyMenuProps so open and onOpenChange form a
paired controlled-state contract: require onOpenChange whenever open is
provided, and prevent open from being supplied without its handler. Preserve an
uncontrolled option for callers that only need initial state by exposing or
using defaultOpen instead.
- Around line 72-76: Update the single-select branch in the property menu to use
DropdownMenuRadioGroup with a controlled value and DropdownMenuRadioItem
entries, replacing the visual selected class and preserving each option’s
onSelect behavior. Leave the multiple-selection branch unchanged.

In `@apps/web/src/features/issues/quick-create.tsx`:
- Around line 38-47: Update the reset effect in QuickCreateDialog so it runs
only when the dialog transitions to open, not whenever the teams array identity
changes. Preserve selecting defaultTeamId or the first team when opening, while
preventing refetches or realtime updates to teams from clearing an in-progress
draft.

In `@apps/web/src/features/issues/workspace-provider.tsx`:
- Around line 113-119: Update the global `useHotkey` callback in the workspace
provider to clear or reset `createTeamId` before opening the create dialog, so
the global `c` shortcut uses the current `routeTeamId` rather than a stale team
selection from `openQuickCreate(teamId)`. Keep the existing
`setCreateOpen(true)` behavior unchanged.

In `@packages/core/src/content/comment-service.ts`:
- Around line 21-36: Update comment access authorization around
loadIssueForComment and the related comment read/write/delete/reaction paths to
enforce team scoping in addition to the existing role and organization checks.
Use the loaded issue teamId and the principal’s team context to reject access to
issues outside the caller’s team, preserving access only for authorized
same-team operations.

---

Nitpick comments:
In `@apps/realtime/src/server.ts`:
- Around line 115-119: The delta fan-out in the parsed.data loop performs an
actions-by-connections scan synchronously; reduce this work by restructuring
batching or indexing so each connection is matched against the batch efficiently
while preserving per-action scope and organization filtering and queueDelta
behavior. Review the relationship between parsed.data handling and
DELTA_BATCH_WINDOW_MS, and ensure batch sizing remains bounded to prevent large
pub/sub messages from causing excessive handler latency.

In `@apps/web/src/app/api/bootstrap/route.ts`:
- Around line 25-34: Update the bootstrap query flow to batch workflow states
and cycles across all team IDs instead of invoking listWorkflowStates and
listCycles once per team. Add or reuse batched query methods that accept the
collected team IDs (for example, using an inArray team filter), then use those
methods in the Promise.all block while preserving the existing states and cycles
results.

In `@apps/web/src/app/api/issues/`[id]/subscribe/route.ts:
- Line 5: Move the subscribed request validator from the local subscribeSchema
definition into the shared validators exported by `@orbit/shared`, then import and
use that shared Zod schema in the route handler. Ensure the handler continues
parsing request bodies through the shared schema and preserves the default
subscribed=true behavior.

In `@apps/web/src/features/issues/board.tsx`:
- Around line 154-168: Update the DragOverlay dropAnimation configuration to
respect the user's prefers-reduced-motion setting: disable the 140ms drop
animation when reduced motion is requested, while preserving the existing
animation for users without that preference. Use the component's existing
media-query or motion-preference utilities if available.

In `@apps/web/src/features/issues/bulk-edit-bar.tsx`:
- Around line 24-26: Update the bulk-edit flow around applyToAll to use a
dedicated batch-update mutation or endpoint for the selected issues instead of
calling update.mutate once per issue. Pass the shared patch and issue collection
through the batch API, preserving the current patch behavior while consolidating
writes, sync updates, and publishes.

In `@apps/web/src/features/issues/priority-glyph.tsx`:
- Around line 6-18: Type the TONE and FILLED_BARS lookup tables against the
shared Priority union so every priority value requires an explicit entry. Update
priorityLabel to use Priority without the unchecked priority as Priority cast,
preserving the existing fallback behavior only where the input boundary still
requires it.

In `@apps/web/src/features/issues/property-menu.tsx`:
- Line 28: Update the children prop declaration in the property menu component
from ReactNode to ReactElement so DropdownMenuTrigger’s asChild composition
always receives a single trigger element; preserve the existing trigger behavior
and ensure the corresponding ReactElement type is imported.

In `@apps/web/src/lib/query/use-issues.ts`:
- Around line 224-228: Update the DELETE request in the mutationFn for issue
deletion to validate the API response with deletedSchema instead of
issueEnvelopeSchema.partial(). Preserve the existing DELETE method and request
flow while enforcing the handler’s { deleted: true } response contract.
🪄 Autofix (Beta)

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

Run ID: f2ab13de-be02-4bab-9345-cb7a149e2546

📥 Commits

Reviewing files that changed from the base of the PR and between e91bae0 and c25583b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (63)
  • .env.example
  • apps/realtime/src/server.ts
  • apps/web/e2e/issues.spec.ts
  • apps/web/next.config.ts
  • apps/web/package.json
  • apps/web/playwright.config.ts
  • apps/web/src/app/(app)/issue/[identifier]/page.tsx
  • apps/web/src/app/(app)/layout.tsx
  • apps/web/src/app/(app)/team/[key]/board/page.tsx
  • apps/web/src/app/(app)/team/[key]/issues/page.tsx
  • apps/web/src/app/(auth)/login/page.tsx
  • apps/web/src/app/api/attachments/presign/route.ts
  • apps/web/src/app/api/bootstrap/route.ts
  • apps/web/src/app/api/comments/[id]/reactions/route.ts
  • apps/web/src/app/api/comments/[id]/route.ts
  • apps/web/src/app/api/comments/route.ts
  • apps/web/src/app/api/dev/sign-in/route.ts
  • apps/web/src/app/api/files/[...key]/route.ts
  • apps/web/src/app/api/issues/[id]/move/route.ts
  • apps/web/src/app/api/issues/[id]/route.ts
  • apps/web/src/app/api/issues/[id]/subscribe/route.ts
  • apps/web/src/app/api/issues/route.ts
  • apps/web/src/app/providers.tsx
  • apps/web/src/components/auth/dev-sign-in.tsx
  • apps/web/src/features/comments/comment-composer.test.tsx
  • apps/web/src/features/comments/comment-composer.tsx
  • apps/web/src/features/comments/comment-thread.tsx
  • apps/web/src/features/comments/viewer-presence.tsx
  • apps/web/src/features/issues/activity-feed.tsx
  • apps/web/src/features/issues/board.tsx
  • apps/web/src/features/issues/bulk-edit-bar.tsx
  • apps/web/src/features/issues/issue-card.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.tsx
  • apps/web/src/features/issues/issue-peek.tsx
  • apps/web/src/features/issues/issue-properties.tsx
  • apps/web/src/features/issues/issue-row.test.tsx
  • apps/web/src/features/issues/issue-row.tsx
  • apps/web/src/features/issues/priority-glyph.tsx
  • apps/web/src/features/issues/property-menu.tsx
  • apps/web/src/features/issues/quick-create.tsx
  • apps/web/src/features/issues/state-glyph.tsx
  • apps/web/src/features/issues/team-view.tsx
  • apps/web/src/features/issues/workspace-provider.tsx
  • apps/web/src/lib/api/dev-login.ts
  • apps/web/src/lib/api/handler.ts
  • apps/web/src/lib/api/issues.ts
  • apps/web/src/lib/query/fetcher.test.ts
  • apps/web/src/lib/query/fetcher.ts
  • apps/web/src/lib/query/keys.ts
  • apps/web/src/lib/query/provider.tsx
  • apps/web/src/lib/query/schemas.ts
  • apps/web/src/lib/query/sync.test.ts
  • apps/web/src/lib/query/sync.ts
  • apps/web/src/lib/query/use-comments.ts
  • apps/web/src/lib/query/use-issues.ts
  • apps/web/src/lib/realtime/delta-bridge.tsx
  • apps/web/src/lib/realtime/provider.tsx
  • apps/web/src/lib/realtime/session.tsx
  • apps/web/tsconfig.json
  • packages/core/src/content/comment-service.ts
  • packages/core/src/index.ts

Comment thread apps/realtime/src/server.ts Resolved
Comment thread apps/web/src/app/(app)/layout.tsx Resolved
Comment thread apps/web/src/app/(auth)/login/page.tsx Resolved
Comment thread apps/web/src/app/api/bootstrap/route.ts 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
apps/web/src/features/comments/comment-thread.tsx (1)

173-193: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Restrict reaction animations to permitted properties.

The reaction controls animate background, border, and text colors, and do not provide a prefers-reduced-motion fallback. Keep motion limited to transform and opacity, disable the pop-in animation for reduced-motion users, and verify --duration-fast resolves to 120 to 200 ms.

As per coding guidelines, apps/web/**/*.{css,tsx,jsx} must use only transform and opacity for motion, limit durations to 120 to 200ms, and respect prefers-reduced-motion.

Proposed fix
-                'animate-pop-in transition-[transform,background-color,border-color] duration-[var(--duration-fast)] hover:scale-105',
+                'animate-pop-in transition-transform duration-[var(--duration-fast)] motion-reduce:animate-none motion-reduce:transition-none hover:scale-105',
...
-                className="flex size-6 items-center justify-center rounded-full border border-border border-dashed text-faint transition-colors duration-[var(--duration-fast)] hover:border-border-strong hover:text-text"
+                className="flex size-6 items-center justify-center rounded-full border border-border border-dashed text-faint hover:border-border-strong hover:text-text"
🤖 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/comments/comment-thread.tsx` around lines 173 - 193,
Update the reaction button styling in the reaction map to animate only transform
and opacity, removing background-color and border-color from the transition.
Ensure the pop-in animation is disabled under prefers-reduced-motion, and
confirm the referenced --duration-fast token resolves to a value between 120ms
and 200ms.

Source: Coding guidelines

apps/web/src/features/issues/issue-detail.tsx (3)

183-200: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not wrap rendered description content in a button.

Description returns a <div> or <p>, and sanitized Markdown may contain links. Nesting this content inside the outer <button> creates invalid interactive markup and causes links to compete with the edit handler, harming keyboard and pointer access. Render the description in a noninteractive container and provide a separate edit button.

As per coding guidelines, UI must be keyboard operable and use real semantics.

🤖 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` around lines 183 - 200,
Replace the outer button around the rendered description in the issue detail
component with a noninteractive container, keeping the empty-state edit control
keyboard-operable. Render Description outside interactive content and add a
separate, semantically labeled edit button that triggers setBodyDraft and
setEditingBody without wrapping links or other description markup.

Source: Coding guidelines


66-74: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Preserve fetch failures instead of reporting “Issue not found.”

When the detail request fails without data, this branch conflates transport/server errors with a confirmed missing issue. Render an error state or rethrow the error, and reserve this empty state for a confirmed 404 response.

As per coding guidelines, errors must never be silently swallowed.

🤖 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` around lines 66 - 74, Update
the issue-detail loading branch around issue and detail.data so failed requests
are surfaced through the existing error state or rethrown rather than rendered
as “Issue not found.” Keep the EmptyState only for a confirmed 404 or
missing-issue response, and ensure fetch errors are never swallowed.

Source: Coding guidelines


225-230: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Surface comment loading failures instead of showing an empty timeline.

comments.data ?? [] makes an initial query failure indistinguishable from a successful issue with no comments. Render an error state or propagate the query error, using an empty array only after a successful response.

As per coding guidelines, errors must never be silently swallowed.

🤖 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` around lines 225 - 230, Update
the CommentThread data flow in the issue detail component so comments query
failures are surfaced rather than converted to an empty timeline. Distinguish
loading/error states from a successful response, pass an empty array only when
the comments request succeeded without results, and render or propagate the
query error.

Source: Coding guidelines

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

Outside diff comments:
In `@apps/web/src/features/comments/comment-thread.tsx`:
- Around line 173-193: Update the reaction button styling in the reaction map to
animate only transform and opacity, removing background-color and border-color
from the transition. Ensure the pop-in animation is disabled under
prefers-reduced-motion, and confirm the referenced --duration-fast token
resolves to a value between 120ms and 200ms.

In `@apps/web/src/features/issues/issue-detail.tsx`:
- Around line 183-200: Replace the outer button around the rendered description
in the issue detail component with a noninteractive container, keeping the
empty-state edit control keyboard-operable. Render Description outside
interactive content and add a separate, semantically labeled edit button that
triggers setBodyDraft and setEditingBody without wrapping links or other
description markup.
- Around line 66-74: Update the issue-detail loading branch around issue and
detail.data so failed requests are surfaced through the existing error state or
rethrown rather than rendered as “Issue not found.” Keep the EmptyState only for
a confirmed 404 or missing-issue response, and ensure fetch errors are never
swallowed.
- Around line 225-230: Update the CommentThread data flow in the issue detail
component so comments query failures are surfaced rather than converted to an
empty timeline. Distinguish loading/error states from a successful response,
pass an empty array only when the comments request succeeded without results,
and render or propagate the query error.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 01465501-2365-42a7-9c08-336efd8aa753

📥 Commits

Reviewing files that changed from the base of the PR and between c25583b and 2a31e2c.

📒 Files selected for processing (6)
  • apps/web/src/features/comments/comment-composer.test.tsx
  • apps/web/src/features/comments/comment-thread.tsx
  • apps/web/src/features/issues/issue-detail.tsx
  • apps/web/src/lib/query/sync.test.ts
  • apps/web/src/lib/query/sync.ts
  • apps/web/src/lib/query/use-comments.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/web/src/features/comments/comment-composer.test.tsx
  • apps/web/src/lib/query/sync.ts

Scopes comment access to the issue team, hardens local file serving with nosniff
and a disposition, keeps one malformed delta from dropping a whole batch, moves
route schemas into the shared validators, gives the mention popup keyboard
navigation and radio semantics to single select menus, and repairs the subscribe
rollback, the title double write and the quick create draft reset.
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