Repository navigation
feat(issues): realtime issue board, list, detail and comments - #11
Conversation
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.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (26)
📝 WalkthroughWalkthroughThis 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. ChangesIssue workspace and collaboration
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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Driven end to end in a real browserTwo Chromium contexts signed in as different seeded users ( BoardColumns 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. Quick create with
|
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.
There was a problem hiding this comment.
Actionable comments posted: 20
🧹 Nitpick comments (8)
apps/web/src/features/issues/property-menu.tsx (1)
28-28: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winTighten
childrento a single trigger element.DropdownMenuTriggerusesasChild, soReactNodestill allows strings or arrays that break composition and keyboard behavior. Switch this prop toReactElementso 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 winValidate the DELETE response with
deletedSchemainstead ofissueEnvelopeSchema.partial().The
/api/issues/[id]DELETE handler returns{ deleted: true }, but this validates againstissueEnvelopeSchema.partial(), which makesissueoptional and therefore parses{ deleted: true }without asserting anything. Use the purpose-builtdeletedSchemaso 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 winPrefer a shared validator for request input.
subscribeSchemais defined locally. The guideline expects route input schemas to come from@orbit/shared; move this (or thesubscribedboolean 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 | 🔵 TrivialPer-team fan-out queries for states/cycles.
listWorkflowStates/listCyclesare invoked once per team viaPromise.all(teams.map(...)), so bootstrap issuesO(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 | 🔵 TrivialNested 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 | 🔵 TrivialConsider 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 winLoosely-typed lookup tables lose type safety against the shared
Priorityunion.
TONEandFILLED_BARSare typedRecord<number, string>/Record<number, number>rather thanRecord<Priority, ...>, andpriorityLabelcasts withpriority as Priority. IfPRIORITIESin@orbit/shared/constantsever gains/changes a value, TypeScript won't flag a missing entry here — it'll silently fall through to the?? TONE[0]/?? 0fallback 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
DragOverlaydrop animation doesn't respectprefers-reduced-motion.The
dropAnimationconfig always applies a 140ms transform animation regardless of the user's motion preference.As per coding guidelines,
apps/web/**/*.{css,tsx,jsx}must "respectprefers-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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (63)
.env.exampleapps/realtime/src/server.tsapps/web/e2e/issues.spec.tsapps/web/next.config.tsapps/web/package.jsonapps/web/playwright.config.tsapps/web/src/app/(app)/issue/[identifier]/page.tsxapps/web/src/app/(app)/layout.tsxapps/web/src/app/(app)/team/[key]/board/page.tsxapps/web/src/app/(app)/team/[key]/issues/page.tsxapps/web/src/app/(auth)/login/page.tsxapps/web/src/app/api/attachments/presign/route.tsapps/web/src/app/api/bootstrap/route.tsapps/web/src/app/api/comments/[id]/reactions/route.tsapps/web/src/app/api/comments/[id]/route.tsapps/web/src/app/api/comments/route.tsapps/web/src/app/api/dev/sign-in/route.tsapps/web/src/app/api/files/[...key]/route.tsapps/web/src/app/api/issues/[id]/move/route.tsapps/web/src/app/api/issues/[id]/route.tsapps/web/src/app/api/issues/[id]/subscribe/route.tsapps/web/src/app/api/issues/route.tsapps/web/src/app/providers.tsxapps/web/src/components/auth/dev-sign-in.tsxapps/web/src/features/comments/comment-composer.test.tsxapps/web/src/features/comments/comment-composer.tsxapps/web/src/features/comments/comment-thread.tsxapps/web/src/features/comments/viewer-presence.tsxapps/web/src/features/issues/activity-feed.tsxapps/web/src/features/issues/board.tsxapps/web/src/features/issues/bulk-edit-bar.tsxapps/web/src/features/issues/issue-card.test.tsxapps/web/src/features/issues/issue-card.tsxapps/web/src/features/issues/issue-detail.tsxapps/web/src/features/issues/issue-list.tsxapps/web/src/features/issues/issue-peek.tsxapps/web/src/features/issues/issue-properties.tsxapps/web/src/features/issues/issue-row.test.tsxapps/web/src/features/issues/issue-row.tsxapps/web/src/features/issues/priority-glyph.tsxapps/web/src/features/issues/property-menu.tsxapps/web/src/features/issues/quick-create.tsxapps/web/src/features/issues/state-glyph.tsxapps/web/src/features/issues/team-view.tsxapps/web/src/features/issues/workspace-provider.tsxapps/web/src/lib/api/dev-login.tsapps/web/src/lib/api/handler.tsapps/web/src/lib/api/issues.tsapps/web/src/lib/query/fetcher.test.tsapps/web/src/lib/query/fetcher.tsapps/web/src/lib/query/keys.tsapps/web/src/lib/query/provider.tsxapps/web/src/lib/query/schemas.tsapps/web/src/lib/query/sync.test.tsapps/web/src/lib/query/sync.tsapps/web/src/lib/query/use-comments.tsapps/web/src/lib/query/use-issues.tsapps/web/src/lib/realtime/delta-bridge.tsxapps/web/src/lib/realtime/provider.tsxapps/web/src/lib/realtime/session.tsxapps/web/tsconfig.jsonpackages/core/src/content/comment-service.tspackages/core/src/index.ts
There was a problem hiding this comment.
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 winRestrict reaction animations to permitted properties.
The reaction controls animate background, border, and text colors, and do not provide a
prefers-reduced-motionfallback. Keep motion limited totransformandopacity, disable the pop-in animation for reduced-motion users, and verify--duration-fastresolves 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 respectprefers-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 winDo not wrap rendered description content in a button.
Descriptionreturns 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 winPreserve 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 winSurface 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
📒 Files selected for processing (6)
apps/web/src/features/comments/comment-composer.test.tsxapps/web/src/features/comments/comment-thread.tsxapps/web/src/features/issues/issue-detail.tsxapps/web/src/lib/query/sync.test.tsapps/web/src/lib/query/sync.tsapps/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.











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.