Repository navigation
Project settings, full MCP coverage, and the first wave of audit fixes - #97
Conversation
A project could not be created or edited at all: there was no POST or PATCH route, so the only projects that existed came from the seed and the importer, and the project page offered Overview, Activity and Issues with no way to change anything. Add the REST surface projects were missing, and a Settings tab that edits the name, summary, status, health, dates and the teams a project spans, with archive alongside. The affordances are gated on project:manage and the route enforces the same policy, so hiding the buttons is not the only gate. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Issues listed in a sprint were inert text, so a sprint review had no way to reach the work it was reviewing. Each row is now a link to the issue with a visible focus ring, which also makes the list keyboard reachable. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
An adversarial audit confirmed that label changes never reached anybody else. Only createIssue passed labelIds into the sync action; update, move and archive published the bare issue row. The receiving client deliberately keeps the labels it already holds when a delta does not carry them, so the delta was the only channel and it was silent: a label added by one person stayed invisible to everyone else, and an issue arriving in a list through realtime rendered with no labels at all because the schema defaults labelIds to an empty array. Every issue action now carries the labels the issue has after the write, and the catch-up loader does the same so a reconnect repairs rather than repeats the gap. Also fix two faults in the MCP tools added earlier today, both caught by the same audit: delete_sprint passed a team reference where a team id was expected so it never found a sprint, and update_project sent startsAt and targetAt, which the project schema strips, so date edits silently did nothing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… the workspace Milestones only ever checked that the project belonged to the same workspace. Reading and reordering used an organisation-only check, and renaming and deleting checked nothing about the project at all, so any member could list, rename and delete the milestones of a project belonging to a team they are not on. Route every entry point through the project visibility check the project service already uses, and load the milestone first so update and delete prove reachability before they write. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The MCP server carried its own createComment that had drifted from the one in core. It skipped the reply validation the REST route enforces, so an agent could attach a reply to a comment on a different issue or nest replies arbitrarily deep, and it published with issue scopes rather than comment scopes, which put the comment body on the project channel and therefore in front of subscribers outside the issue's team. Delete the copy and call the shared service, which validates the parent and scopes the delta to the issue and its team. Tests cover the two rejected reply shapes through the tool, and the scoping where the actions are visible. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR adds project settings and project API routes, makes cycle issues navigable, includes label IDs in synchronization actions, enforces project visibility for milestones, and expands MCP organization and workspace tooling. ChangesProject management
Cycle issue navigation
Core domain updates
MCP tooling
Estimated code review effort: 5 (Critical) | ~90 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
/standup renders StandupPage from features/standup. The cross-team StandupView in features/issues, its preferences hook and its test were left behind by an earlier rewrite and are imported by nothing, so they were 455 lines of dead code that still had to typecheck and still confused a reader looking for the standup surface. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/core/src/realtime/backfill.ts (1)
351-377: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd a regression test for issue backfills.
This PR does not add a test for the new backfill payload contract. Add a database-backed test under
packages/core/tests/realtime/that verifies labeled issues emit alllabelIdsand unlabelled issues emit[].As per coding guidelines, “A feature is incomplete until it has tests that would fail if the feature broke.”
🤖 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 `@packages/core/src/realtime/backfill.ts` around lines 351 - 377, Add a database-backed regression test under the realtime tests covering the issue backfill handler identified by the `issue` callback: create one labeled issue and one unlabeled issue, invoke the backfill, and assert the labeled payload contains every associated label ID while the unlabeled payload contains an empty `labelIds` array.Source: Coding guidelines
🧹 Nitpick comments (10)
apps/web/tests/features/projects/project-settings-form.test.tsx (2)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse the
@/alias for this import.Line 4 imports
ToastProviderthrough@/components/ui/toast.tsx, and line 5 uses a deep relative path for the component under test. Use@/features/projects/project-settings-form.tsxso both imports follow the same convention.♻️ Proposed change
-import { ProjectSettingsForm } from '../../../src/features/projects/project-settings-form.tsx'; +import { ProjectSettingsForm } from '`@/features/projects/project-settings-form.tsx`';As per coding guidelines: "Use workspace aliases
@orbit/dband@orbit/shared, and use@/inside apps/web."🤖 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/tests/features/projects/project-settings-form.test.tsx` at line 5, Update the ProjectSettingsForm import in project-settings-form.test.tsx to use the `@/features/projects/project-settings-form.tsx` alias instead of the deep relative path, matching the existing ToastProvider import convention.Source: Coding guidelines
113-124: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a test for the failed-request branch.
The
fetchstub always resolves with status 200, so no test exercises thecatchbranches inonSubmitandarchive. Theproject-settings-errorparagraph and themessageOfmapping can break without a test failure. Add a case that returns a non-OK response and asserts the rendered error text.💚 Proposed test
+ it('shows the error when the save fails', async () => { + failNext = true; + renderForm(); + const user = userEvent.setup(); + + await user.click(screen.getByTestId('project-save')); + + await waitFor(() => + expect(screen.getByTestId('project-settings-error')).toHaveTextContent('Nope'), + ); + });Add a
failNextflag to thefetchstub. When the flag is set, resolve with status 400 and the body{ error: { code: 'invalid', message: 'Nope' } }, then reset the flag inafterEach.As per coding guidelines: "A feature is incomplete until it has tests that would fail if the feature broke."
🤖 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/tests/features/projects/project-settings-form.test.tsx` around lines 113 - 124, Add a failed-request test in the project settings form suite by extending the fetch stub with a fail-next control that returns a non-OK 400 response containing the invalid error payload, and reset that control in afterEach. Exercise the archive or submit failure path and assert the rendered project-settings-error text matches the messageOf mapping result.Source: Coding guidelines
apps/web/src/features/projects/project-settings-form.tsx (4)
209-212: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd the shared hover treatment to the selectable team chips.
These chips are selectable rows with a border, but they have no hover affordance. Apply
cardHoverfromapps/web/src/lib/interaction.tsso the hover and focus transitions use the shared duration and easing tokens.Based on learnings: "For selectable card/invite-row border/background hover behavior, use
cardHover(rather than custom Tailwind hover color 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/projects/project-settings-form.tsx` around lines 209 - 212, Update the selectable team chip label in the team-selection rendering to include the shared cardHover class from the interaction utilities, replacing any custom hover treatment if present. Preserve the existing layout, border, and text classes while using cardHover for the standard hover and focus transition behavior.Source: Learnings
254-254: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the unused hidden
sluginput.The form submits through
onSubmitandapiRequest, so this element is never read. It also has nonameattribute, so it would not appear inFormData.slughas no other use in the component. Remove the input, and remove theslugprop unless a caller needs it.♻️ Proposed cleanup
- <input type="hidden" value={slug} readOnly aria-hidden="true" /> </form>Then drop
slugfromProjectSettingsFormPropsand the destructured parameters, and remove theslug={slug}prop inapps/web/src/app/(app)/projects/[slug]/settings/page.tsx.🤖 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-settings-form.tsx` at line 254, Remove the unused hidden slug input from ProjectSettingsForm, then remove slug from ProjectSettingsFormProps and the component’s destructured parameters. Update the settings page caller to stop passing slug={slug} to ProjectSettingsForm.
71-108: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy liftRoute these mutations through TanStack Query.
onSubmitandarchivecallapiRequestdirectly and then callrouter.refresh(). Client caches that hold project data are not invalidated or patched, so the project header, board, and list can show stale values after a save or an archive. Wrap both calls in TanStack Query mutations and invalidate or patch the project cache entries on success.As per coding guidelines: "Use TanStack Query for server-state fetching with optimistic mutations; realtime updates invalidate and patch the cache rather than triggering a full refetch of the visible list."
🤖 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-settings-form.tsx` around lines 71 - 108, Update onSubmit and archive to use TanStack Query mutation hooks instead of calling apiRequest directly. Move the existing success and error handling into the mutation lifecycle, then invalidate or patch all relevant project cache entries on success so the header, board, and list reflect saved or archived data; remove the router.refresh() dependency.Source: Coding guidelines
110-111: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReuse the shared field styling for the selects and date inputs.
fieldClassduplicates the styling of the sharedInputcomponent and replaces its focus ring with a border color change only. Extract the shared field classes, or accept aclassNameonInput, so all controls in this form show the same visible focus indicator.As per coding guidelines: "Ensure the UI is keyboard operable, provides visible focus rings, and uses real semantics from Radix primitives."
🤖 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-settings-form.tsx` around lines 110 - 111, Update the form’s shared field styling around fieldClass so selects and date inputs reuse the same classes and visible focus-ring treatment as the shared Input component. Prefer extracting the common classes or extending Input with className, then apply that shared styling to every relevant control without replacing the focus ring with only a border-color change.Source: Coding guidelines
packages/core/tests/content/comment-service.test.ts (1)
64-68: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAssert the concrete team and issue scopes.
The current prefix checks accept any
team:*andissue:*values. A wrong team or issue scope could therefore pass this test. Assert the scopes forworkspace.teamIdandissue.id, using the repository's scope helpers if available.Suggested assertion
- expect(action.scopes.some((scope) => scope.startsWith('team:'))).toBe(true); - expect(action.scopes.some((scope) => scope.startsWith('issue:'))).toBe(true); + expect(action.scopes).toContain(`team:${workspace.teamId}`); + expect(action.scopes).toContain(`issue:${issue.id}`);Based on coding guidelines, this feature must have tests that fail when its scope contract breaks.
🤖 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 `@packages/core/tests/content/comment-service.test.ts` around lines 64 - 68, Replace the broad prefix checks in the test’s action scope assertions with exact expectations for the team scope derived from workspace.teamId and the issue scope derived from issue.id. Reuse the repository’s existing scope helper symbols if available, while preserving the assertion that no project scope is published.Source: Coding guidelines
packages/mcp-server/tests/tools.test.ts (2)
94-101: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd discovery assertions for
update_teamandupdate_view.
registerOrgToolsregisters nine tools. This block asserts seven of them.update_teamandupdate_vieware not covered, so a registration regression on either tool would not fail this test.💚 Proposed additions
expect(names).toContain('create_team'); + expect(names).toContain('update_team'); expect(names).toContain('add_team_member'); expect(names).toContain('remove_team_member'); expect(names).toContain('remove_member'); expect(names).toContain('list_views'); expect(names).toContain('create_view'); + expect(names).toContain('update_view'); expect(names).toContain('delete_view');🤖 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 `@packages/mcp-server/tests/tools.test.ts` around lines 94 - 101, Extend the tool-name assertions in the registration test to include both update_team and update_view, alongside the existing expectations for registerOrgTools. Keep the current assertions unchanged.
215-243: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the expected reply rejection error in both tests.
rejects.toThrow()accepts any thrown error. These cases should assertvalidationFailed('That reply belongs to another issue.')andvalidationFailed('Replies only nest one level deep.')so failures in unrelated code do not pass the tests.🤖 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 `@packages/mcp-server/tests/tools.test.ts` around lines 215 - 243, Strengthen the rejection assertions in the cross-issue reply test and the “refuses to nest a reply more than one level deep” test by matching the specific validationFailed errors with messages “That reply belongs to another issue.” and “Replies only nest one level deep.” respectively, instead of accepting any thrown error.packages/mcp-server/src/tools/org.ts (1)
183-183: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winValidate
filterwithviewStateSchemainstead of an opaque record.
createViewreceivesfilterdirectly from MCP input, butz.record(z.string(), z.unknown())accepts unsupported filter shapes. Use the sharedviewStateSchemafrom@orbit/shared/filters, aligned withlayoutandgroupBy, so invalid filters are rejected before persistence.🤖 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 `@packages/mcp-server/src/tools/org.ts` at line 183, Update the createView input schema’s filter field to use the shared viewStateSchema from `@orbit/shared/filters` instead of z.record, matching the validation used by layout and groupBy. Preserve the existing description while ensuring unsupported filter shapes are rejected before persistence.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/web/src/app/api/projects/`[id]/route.ts:
- Around line 37-44: Update the DELETE handler around the mode branching to
validate the query parameters with a Zod schema from `@orbit/shared`, allowing
only the supported archive and delete modes. Execute archiveProject only for
mode=archive and execute deleteProject only for explicit mode=delete; reject
missing or invalid modes instead of treating them as permanent deletion.
In `@apps/web/tests/features/cycles/cycle-issue-list.test.tsx`:
- Around line 54-60: Update the test named “still shows the identifier, the
title and the assignee” to assert Ada’s assignee avatar or its fallback using a
stable query, in addition to the existing identifier and title assertions.
Ensure the assertion would fail if CycleIssueList stops rendering
issue.assignee.
In `@packages/core/tests/work/milestone-service.test.ts`:
- Around line 160-203: Add a test alongside the existing outsider visibility
cases that creates a milestone on the private project, calls reorderMilestones
with the outsider principal, and asserts the operation rejects. Use the existing
projectId, milestone, and stranger setup patterns so the test verifies
reorderMilestones enforces the same project visibility check.
In `@packages/mcp-server/src/tools/org.ts`:
- Around line 24-30: Update resolveView to exclude views with virtual === true
before matching IDs or names, so only saved views can be resolved. Preserve
exact ID matching, but collect name matches and throw conflict when multiple
saved views share the requested name, requiring the caller to provide the saved
view ID; retain notFound for no matches and return the matched saved view’s ID.
---
Outside diff comments:
In `@packages/core/src/realtime/backfill.ts`:
- Around line 351-377: Add a database-backed regression test under the realtime
tests covering the issue backfill handler identified by the `issue` callback:
create one labeled issue and one unlabeled issue, invoke the backfill, and
assert the labeled payload contains every associated label ID while the
unlabeled payload contains an empty `labelIds` array.
---
Nitpick comments:
In `@apps/web/src/features/projects/project-settings-form.tsx`:
- Around line 209-212: Update the selectable team chip label in the
team-selection rendering to include the shared cardHover class from the
interaction utilities, replacing any custom hover treatment if present. Preserve
the existing layout, border, and text classes while using cardHover for the
standard hover and focus transition behavior.
- Line 254: Remove the unused hidden slug input from ProjectSettingsForm, then
remove slug from ProjectSettingsFormProps and the component’s destructured
parameters. Update the settings page caller to stop passing slug={slug} to
ProjectSettingsForm.
- Around line 71-108: Update onSubmit and archive to use TanStack Query mutation
hooks instead of calling apiRequest directly. Move the existing success and
error handling into the mutation lifecycle, then invalidate or patch all
relevant project cache entries on success so the header, board, and list reflect
saved or archived data; remove the router.refresh() dependency.
- Around line 110-111: Update the form’s shared field styling around fieldClass
so selects and date inputs reuse the same classes and visible focus-ring
treatment as the shared Input component. Prefer extracting the common classes or
extending Input with className, then apply that shared styling to every relevant
control without replacing the focus ring with only a border-color change.
In `@apps/web/tests/features/projects/project-settings-form.test.tsx`:
- Line 5: Update the ProjectSettingsForm import in
project-settings-form.test.tsx to use the
`@/features/projects/project-settings-form.tsx` alias instead of the deep relative
path, matching the existing ToastProvider import convention.
- Around line 113-124: Add a failed-request test in the project settings form
suite by extending the fetch stub with a fail-next control that returns a non-OK
400 response containing the invalid error payload, and reset that control in
afterEach. Exercise the archive or submit failure path and assert the rendered
project-settings-error text matches the messageOf mapping result.
In `@packages/core/tests/content/comment-service.test.ts`:
- Around line 64-68: Replace the broad prefix checks in the test’s action scope
assertions with exact expectations for the team scope derived from
workspace.teamId and the issue scope derived from issue.id. Reuse the
repository’s existing scope helper symbols if available, while preserving the
assertion that no project scope is published.
In `@packages/mcp-server/src/tools/org.ts`:
- Line 183: Update the createView input schema’s filter field to use the shared
viewStateSchema from `@orbit/shared/filters` instead of z.record, matching the
validation used by layout and groupBy. Preserve the existing description while
ensuring unsupported filter shapes are rejected before persistence.
In `@packages/mcp-server/tests/tools.test.ts`:
- Around line 94-101: Extend the tool-name assertions in the registration test
to include both update_team and update_view, alongside the existing expectations
for registerOrgTools. Keep the current assertions unchanged.
- Around line 215-243: Strengthen the rejection assertions in the cross-issue
reply test and the “refuses to nest a reply more than one level deep” test by
matching the specific validationFailed errors with messages “That reply belongs
to another issue.” and “Replies only nest one level deep.” respectively, instead
of accepting any thrown error.
🪄 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: dc8fc9f3-7214-4017-b6d2-b240f709b90b
📒 Files selected for processing (21)
apps/web/src/app/(app)/projects/[slug]/settings/page.tsxapps/web/src/app/api/projects/[id]/route.tsapps/web/src/app/api/projects/route.tsapps/web/src/features/cycles/cycle-board.tsxapps/web/src/features/projects/health-chip.tsxapps/web/src/features/projects/project-settings-form.tsxapps/web/src/features/projects/project-tabs.tsxapps/web/tests/features/cycles/cycle-issue-list.test.tsxapps/web/tests/features/projects/project-settings-form.test.tsxpackages/core/src/realtime/backfill.tspackages/core/src/work/issue-service.tspackages/core/src/work/milestone-service.tspackages/core/tests/content/comment-service.test.tspackages/core/tests/work/issue-service.test.tspackages/core/tests/work/milestone-service.test.tspackages/mcp-server/src/comments.tspackages/mcp-server/src/tools/index.tspackages/mcp-server/src/tools/issues.tspackages/mcp-server/src/tools/org.tspackages/mcp-server/src/tools/workspace.tspackages/mcp-server/tests/tools.test.ts
💤 Files with no reviewable changes (1)
- packages/mcp-server/src/comments.ts
The project DELETE route treated any mode other than archive as a permanent delete, so a typo such as mode=archived would have destroyed the project. The parameter is now parsed with a Zod enum and the caller has to ask for delete by name. resolveView in the MCP tools searched the built in virtual views alongside the saved ones, so update_view and delete_view could resolve to a virtual id and fail deep inside the service with an unhelpful error, and a name shared with a workspace-shared view resolved to whichever came first. It now searches saved views only and refuses an ambiguous name rather than guessing. Two tests did not test what their names claimed: the sprint row test never asserted the assignee, and the milestone visibility suite never exercised reorder. Both now do. Asserting the assignee showed that an avatar with no image had no accessible name at all, so Avatar carries one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@packages/mcp-server/src/tools/org.ts`:
- Around line 26-30: Update the saved-view lookup around byId and the
name-matching logic to trim ref once before matching. Use the normalized
reference for both ID comparison and case-insensitive name matching, preserving
the existing matching behavior otherwise.
🪄 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: 4f69d0b2-ae49-433e-b7bf-8e2862686732
📒 Files selected for processing (8)
apps/web/src/app/api/projects/[id]/route.tsapps/web/src/components/ui/avatar.tsxapps/web/src/features/issues/standup-view.tsxapps/web/src/features/issues/use-standup-prefs.tsapps/web/tests/features/cycles/cycle-issue-list.test.tsxapps/web/tests/features/issues/standup-view.test.tsxpackages/core/tests/work/milestone-service.test.tspackages/mcp-server/src/tools/org.ts
💤 Files with no reviewable changes (3)
- apps/web/src/features/issues/use-standup-prefs.ts
- apps/web/tests/features/issues/standup-view.test.tsx
- apps/web/src/features/issues/standup-view.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
- apps/web/tests/features/cycles/cycle-issue-list.test.tsx
- packages/core/tests/work/milestone-service.test.ts
- apps/web/src/app/api/projects/[id]/route.ts
The view, label and document resolvers matched the raw string, so a reference carrying stray whitespace missed a row the other resolvers in resolve.ts would have found, since those trim before comparing. All three now trim first and compare against a trimmed candidate. Adding a test for it surfaced a real defect in create_label: the tool made colour optional and omitted it, but labelCreateSchema requires one, so the tool failed validation every time it was called without a colour. It now defaults to the Orbit accent. The label tools also advertised a description field the label schema does not have, so it was silently dropped; it is gone. A document title that matches more than one document now asks for the id rather than picking whichever came back first. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Project settings
Projects could not be created or edited at all: there was no
POST /api/projectsand noPATCH /api/projects/[id], so every project came from the seed or the importer and the project page offered Overview, Activity and Issues with nothing to change. This adds the missing REST surface and a Settings tab covering name, summary, status, health, dates and the teams a project spans, plus archive. Affordances are gated onproject:manageand the route enforces the same policy.MCP
40 tools to 75. Documents were absent entirely and now have list, read, create, update, archive, collections and the comment thread. Issues gained archive, restore and delete. Labels, projects, milestones, sprints and comments gained update and delete. Teams, team membership, member removal and saved views are now reachable.
Audit fixes
An adversarial audit ran over six surfaces and produced 28 findings, 26 of which survived refutation. This PR closes the highest severity ones.
Labels never reached other clients. Only
createIssueputlabelIdson the sync action; update, move and archive published the bare issue row. The receiving client deliberately keeps the labels it already holds when a delta does not carry them, so the delta was the only channel and it was silent. A label added by one person stayed invisible to everyone else, and an issue arriving in a list through realtime rendered with no labels because the schema defaultslabelIdsto[]. Every action now carries the labels, and the catch-up loader does too so a reconnect repairs rather than repeats the gap.Milestones were gated on the workspace, not the team. Read and reorder used an organisation-only check; rename and delete checked nothing about the project. Any member could list, rename and delete the milestones of another team's project. Everything now goes through the project visibility check the project service already uses.
MCP carried a private copy of
createCommentthat had drifted from the shared one. It skipped the reply validation the REST route enforces, so an agent could reply across issues or nest arbitrarily deep, and it published with issue scopes instead of comment scopes, putting comment bodies on the project channel in front of subscribers outside the issue's team. The copy is deleted and the shared service is called.Two faults in the MCP tools added earlier today, both found by the same audit:
delete_sprintpassed a team reference where a team id was expected so it never found a sprint, andupdate_projectsentstartsAt/targetAt, which the project schema strips, so date edits silently did nothing.Sprint issues were inert text, so a sprint review could not reach the work it was reviewing. Each row is now a link with a visible focus ring.
Also
/.well-known/openid-configurationwas 404ing. It serves the authorization server metadata now, with the route config declared rather than re-exported, because Next parses it statically and the first attempt broke the build.bun run verifyis green.