Skip to content

Project settings, full MCP coverage, and the first wave of audit fixes - #97

Merged
imshashank merged 8 commits into
mainfrom
settings-and-mcp
Aug 6, 2026
Merged

imshashank merged 8 commits into
mainfrom
settings-and-mcp

Conversation

@imshashank

Copy link
Copy Markdown
Contributor

Project settings

Projects could not be created or edited at all: there was no POST /api/projects and no PATCH /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 on project:manage and 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 createIssue put labelIds on 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 defaults labelIds to []. 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 createComment that 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_sprint passed a team reference where a team id was expected so it never found a sprint, and update_project sent startsAt/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-configuration was 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 verify is green.

imshashank and others added 5 commits August 6, 2026 02:04
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]>
@vercel

vercel Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

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

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

Request Review

@greptile-apps greptile-apps 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.

imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@imshashank, you've reached your PR review limit, so we couldn't start this review.

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 @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 Plus

Run ID: f742b33f-b5ef-4e55-bdc8-db2de8de4f02

📥 Commits

Reviewing files that changed from the base of the PR and between 40ee1ba and 3742738.

📒 Files selected for processing (4)
  • packages/mcp-server/src/tools/docs.ts
  • packages/mcp-server/src/tools/org.ts
  • packages/mcp-server/src/tools/workspace.ts
  • packages/mcp-server/tests/tools.test.ts
📝 Walkthrough

Walkthrough

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

Changes

Project management

Layer / File(s) Summary
Project API handlers
apps/web/src/app/api/projects/route.ts, apps/web/src/app/api/projects/[id]/route.ts
Adds authenticated project listing, creation, retrieval, updates, archiving, and deletion handlers.
Project settings page and form
apps/web/src/app/(app)/projects/[slug]/settings/page.tsx, apps/web/src/features/projects/project-settings-form.tsx, apps/web/src/features/projects/project-tabs.tsx, apps/web/src/features/projects/health-chip.tsx, apps/web/tests/features/projects/project-settings-form.test.tsx
Adds project settings navigation, editable project fields, team assignment, permission restrictions, archive behavior, and form tests.

Cycle issue navigation

Layer / File(s) Summary
Cycle issue row links
apps/web/src/features/cycles/cycle-board.tsx, apps/web/src/components/ui/avatar.tsx, apps/web/tests/features/cycles/cycle-issue-list.test.tsx
Makes each cycle issue row link to its issue page and tests content, avatars, and focus styling.

Core domain updates

Layer / File(s) Summary
Issue label synchronization
packages/core/src/work/issue-service.ts, packages/core/src/realtime/backfill.ts, packages/core/tests/work/issue-service.test.ts
Adds current labelIds to issue actions and realtime backfill payloads, with coverage for update, move, archive, and label changes.
Milestone reachability checks
packages/core/src/work/milestone-service.ts, packages/core/tests/work/milestone-service.test.ts
Uses project visibility and shared milestone reachability checks across milestone operations, with owning-team authorization tests.
Comment scope validation
packages/core/tests/content/comment-service.test.ts
Verifies comment actions include issue and team scopes but exclude project scope.

MCP tooling

Layer / File(s) Summary
Organization tool registration
packages/mcp-server/src/tools/org.ts, packages/mcp-server/src/tools/index.ts, packages/mcp-server/tests/tools.test.ts
Registers team, membership, workspace-member, and saved-view tools with input resolution and action publication.
Workspace tool resolution and date contracts
packages/mcp-server/src/tools/workspace.ts
Resolves teams before sprint deletion and renames project date inputs to startDate and targetDate.
Comment service integration and reply validation
packages/mcp-server/src/tools/issues.ts, packages/mcp-server/tests/tools.test.ts
Moves comment creation to @orbit/core and tests issue-scoped parents and one-level reply nesting.

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

Possibly related PRs

🚥 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 clearly summarizes the main project settings, MCP coverage, and audit-fix changes.
Description check ✅ Passed The description directly explains the project settings, MCP expansion, audit fixes, and related implementation changes.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch settings-and-mcp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

@greptile-apps greptile-apps 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.

imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

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

⚠️ Outside diff range comments (1)
packages/core/src/realtime/backfill.ts (1)

351-377: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add 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 all labelIds and 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 value

Use the @/ alias for this import.

Line 4 imports ToastProvider through @/components/ui/toast.tsx, and line 5 uses a deep relative path for the component under test. Use @/features/projects/project-settings-form.tsx so 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/db and @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 win

Add a test for the failed-request branch.

The fetch stub always resolves with status 200, so no test exercises the catch branches in onSubmit and archive. The project-settings-error paragraph and the messageOf mapping 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 failNext flag to the fetch stub. When the flag is set, resolve with status 400 and the body { error: { code: 'invalid', message: 'Nope' } }, then reset the flag in afterEach.

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 value

Add the shared hover treatment to the selectable team chips.

These chips are selectable rows with a border, but they have no hover affordance. Apply cardHover from apps/web/src/lib/interaction.ts so 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 value

Remove the unused hidden slug input.

The form submits through onSubmit and apiRequest, so this element is never read. It also has no name attribute, so it would not appear in FormData. slug has no other use in the component. Remove the input, and remove the slug prop unless a caller needs it.

♻️ Proposed cleanup
-      <input type="hidden" value={slug} readOnly aria-hidden="true" />
     </form>

Then drop slug from ProjectSettingsFormProps and the destructured parameters, and remove the slug={slug} prop in apps/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 lift

Route these mutations through TanStack Query.

onSubmit and archive call apiRequest directly and then call router.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 win

Reuse the shared field styling for the selects and date inputs.

fieldClass duplicates the styling of the shared Input component and replaces its focus ring with a border color change only. Extract the shared field classes, or accept a className on Input, 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 win

Assert the concrete team and issue scopes.

The current prefix checks accept any team:* and issue:* values. A wrong team or issue scope could therefore pass this test. Assert the scopes for workspace.teamId and issue.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 win

Add discovery assertions for update_team and update_view.

registerOrgTools registers nine tools. This block asserts seven of them. update_team and update_view are 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 win

Assert the expected reply rejection error in both tests.

rejects.toThrow() accepts any thrown error. These cases should assert validationFailed('That reply belongs to another issue.') and validationFailed('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 win

Validate filter with viewStateSchema instead of an opaque record.

createView receives filter directly from MCP input, but z.record(z.string(), z.unknown()) accepts unsupported filter shapes. Use the shared viewStateSchema from @orbit/shared/filters, aligned with layout and groupBy, 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

📥 Commits

Reviewing files that changed from the base of the PR and between a7c6c89 and cfd13bb.

📒 Files selected for processing (21)
  • apps/web/src/app/(app)/projects/[slug]/settings/page.tsx
  • apps/web/src/app/api/projects/[id]/route.ts
  • apps/web/src/app/api/projects/route.ts
  • apps/web/src/features/cycles/cycle-board.tsx
  • apps/web/src/features/projects/health-chip.tsx
  • apps/web/src/features/projects/project-settings-form.tsx
  • apps/web/src/features/projects/project-tabs.tsx
  • apps/web/tests/features/cycles/cycle-issue-list.test.tsx
  • apps/web/tests/features/projects/project-settings-form.test.tsx
  • packages/core/src/realtime/backfill.ts
  • packages/core/src/work/issue-service.ts
  • packages/core/src/work/milestone-service.ts
  • packages/core/tests/content/comment-service.test.ts
  • packages/core/tests/work/issue-service.test.ts
  • packages/core/tests/work/milestone-service.test.ts
  • packages/mcp-server/src/comments.ts
  • packages/mcp-server/src/tools/index.ts
  • packages/mcp-server/src/tools/issues.ts
  • packages/mcp-server/src/tools/org.ts
  • packages/mcp-server/src/tools/workspace.ts
  • packages/mcp-server/tests/tools.test.ts
💤 Files with no reviewable changes (1)
  • packages/mcp-server/src/comments.ts

Comment thread packages/mcp-server/src/tools/org.ts Resolved
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]>

@greptile-apps greptile-apps 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.

imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

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

📥 Commits

Reviewing files that changed from the base of the PR and between cfd13bb and 40ee1ba.

📒 Files selected for processing (8)
  • apps/web/src/app/api/projects/[id]/route.ts
  • apps/web/src/components/ui/avatar.tsx
  • apps/web/src/features/issues/standup-view.tsx
  • apps/web/src/features/issues/use-standup-prefs.ts
  • apps/web/tests/features/cycles/cycle-issue-list.test.tsx
  • apps/web/tests/features/issues/standup-view.test.tsx
  • packages/core/tests/work/milestone-service.test.ts
  • packages/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

Comment thread packages/mcp-server/src/tools/org.ts Resolved
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]>

@greptile-apps greptile-apps 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.

imshashank has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant