Skip to content

feat: team settings, issue copy actions, and a visible delete - #171

Merged
imshashank merged 3 commits into
mainfrom
feat/team-settings
Aug 8, 2026
Merged

imshashank merged 3 commits into
mainfrom
feat/team-settings

Conversation

@imshashank

@imshashank imshashank commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Teams

Teams could only be renamed or archived from one long list in workspace settings, nothing in the sidebar led there, and an archived team could never be brought back because the UI had no restore at all. Archiving was a one way door.

  • restoreTeam in core, mirroring archiveTeam, reachable at POST /api/teams/:id/restore
  • A per team settings page at /team/[key]/settings: name, description, membership, and an archive that asks first and can be undone
  • Each team in the sidebar gets a menu pointing at its own settings

Archive stays a soft delete. Nothing destroys a team or its issues.

Issue copy actions

Four icon actions in the issue detail header, matching what people expect from a tracker wired to git:

Action Copies
Copy link https://orbit.noveum.ai/issue/ENG-42
Copy issue ID ENG-42
Copy branch name shashank/eng-42-fan-out-delta-packets
Copy as prompt the block below
Work on Orbit issue ENG-42:

Suggested branch name: shashank/eng-42-fan-out-delta-packets

<issue identifier="ENG-42">
<title>Fan out delta packets</title>
<team name="Engineering"/>
<state name="In Progress"/>
<priority name="Urgent"/>
<assignee name="shashank"/>
<label>marketing</label>
<project name="API.market"/>
<url>https://orbit.noveum.ai/issue/ENG-42</url>
</issue>

issuePrompt lives in @orbit/shared/utils next to branchName, so the MCP server can use the same format. Every value is XML escaped, so a crafted title cannot forge a tag. Fields the issue does not have are left out rather than emitted empty.

Create dialog

The dialog hardcoded estimate: null, so effort could only be set after the issue existed. It now has an Estimate control alongside the others, and creates with it.

Delete

Delete was reachable only from the three dot menu. It now also sits at the bottom of the properties panel, below Sprint, still gated on issue:delete and still confirming first.

Tests

bun run verify green. New coverage: issuePrompt formatting and escaping (6), the copy toolbar including the clipboard being refused (9), the team settings panel (5), archive and restore round trip in core against Postgres (4), the sidebar team menu (2), estimate on create (2), the delete row (2).

Four existing test harnesses render the issue detail and were missing TooltipProvider, which the app mounts globally in providers.tsx. Added there rather than dropping the shared Tooltip.

🤖 Generated with Claude Code

Greptile Summary

The update completes both previously requested fixes.

  • Properties-panel deletion now closes a peek or navigates away from a deleted issue page after success.
  • Archived teams remain accessible through workspace settings, where their settings page exposes the restore action.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/web/src/features/issues/issue-detail.tsx Passes the existing surface-leave callback into the properties panel so successful deletion closes or navigates away from the issue.
apps/web/src/features/issues/issue-properties.tsx Propagates the deletion callback through the visible delete row into the shared deletion workflow.
apps/web/src/features/settings/teams-panel.tsx Adds an unconditional settings link for active and archived teams, preserving access to restoration.
apps/web/src/features/settings/team-settings-panel.tsx Presents the restore action for archived teams and refreshes server-rendered state after completion.

Reviews (2): Last reviewed commit: "fix: close the surface after a delete an..." | Re-trigger Greptile

Teams could only be renamed or archived from one long list under
workspace settings, nothing in the sidebar led there, and an archived
team could never be brought back because the UI had no restore at all.

Add restoreTeam alongside archiveTeam, a POST /api/teams/:id/restore to
reach it, and a per team settings page holding the name, description,
membership, and an archive that asks first and can be undone. Each team
in the sidebar gets a menu pointing at its own page.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@imshashank
imshashank requested a review from pulkitxm as a code owner August 8, 2026 10:12
@vercel

vercel Bot commented Aug 8, 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 8, 2026 10:56am

Request Review

@github-actions github-actions Bot added documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure area: web The Next.js app and its UI area: issues Issues, lists and boards labels Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Added team settings and restoration flows, issue copy and deletion actions, quick-create estimates, shared issue prompt formatting, UI integrations, test coverage, and Next.js agent guidance.

Changes

Team management

Layer / File(s) Summary
Team restoration service and route
packages/core/src/org/team-service.ts, packages/core/tests/org/team-service.test.ts, apps/web/src/app/api/teams/[id]/restore/route.ts
Added authorized team restoration, transactional sync updates, the restore API route, and lifecycle tests.
Team settings UI and navigation
apps/web/src/app/(app)/team/[key]/settings/page.tsx, apps/web/src/features/settings/team-settings-panel.tsx, apps/web/src/components/layout/sidebar-team.tsx, apps/web/tests/features/settings/team-settings-panel.test.tsx, apps/web/tests/components/layout/sidebar.test.tsx
Added team settings, membership controls, archive and restore actions, sidebar navigation, and UI tests.

Issue workflows

Layer / File(s) Summary
Issue prompt and copy actions
packages/shared/src/utils/index.ts, packages/shared/tests/utils/issue-prompt.test.ts, apps/web/src/features/issues/issue-copy-actions.tsx, apps/web/src/features/issues/issue-detail.tsx, apps/web/tests/features/issues/issue-copy-actions.test.tsx
Added XML-safe issue prompt formatting and actions to copy issue links, identifiers, branch names, and prompts.
Issue deletion controls and coverage
apps/web/src/features/issues/issue-properties.tsx, apps/web/tests/features/issues/issue-properties.test.tsx, apps/web/tests/features/issues/issue-detail-delete.test.tsx
Added permission-aware issue deletion controls and related tests.
Quick-create estimates and tooltip test context
apps/web/src/features/issues/quick-create.tsx, apps/web/tests/features/issues/quick-create.test.tsx, apps/web/tests/features/issues/{board,issue-list,my-issues-view}.test.tsx
Added estimate selection to quick creation and tooltip providers to affected test render trees.

Web development guidance

Layer / File(s) Summary
Next.js agent guidance
apps/web/AGENTS.md, apps/web/CLAUDE.md
Added Next.js documentation, deprecation, regeneration, and agent-reference guidance.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: pulkitxm

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description accurately summarizes the team settings, issue copy actions, estimate selection, deletion, restoration, and related tests.
Title check ✅ Passed The title clearly identifies the main feature areas: team settings, issue copy actions, and visible deletion.
✨ 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 feat/team-settings

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.

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

🧹 Nitpick comments (3)
apps/web/src/features/issues/issue-copy-actions.tsx (1)

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

Use the shared public URL contract.

The local issueUrl helper bypasses absoluteUrl(). This bypasses centralized validation and normalization. Update its tests with the same contract.

  • apps/web/src/features/issues/issue-copy-actions.tsx#L14-L15: replace manual origin concatenation with absoluteUrl() from @/lib/env.ts.
  • apps/web/tests/features/issues/issue-copy-actions.test.tsx#L120-L132: update URL expectations for the configured normalized public URL.

Based on learnings and coding guidelines, build public absolute URLs with absoluteUrl(path).

🤖 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-copy-actions.tsx` around lines 14 - 15,
Update issueUrl in apps/web/src/features/issues/issue-copy-actions.tsx#L14-L15
to build the issue path through absoluteUrl() from `@/lib/env.ts`, removing manual
origin concatenation while preserving the /issue/{identifier} path. Update the
URL expectations in
apps/web/tests/features/issues/issue-copy-actions.test.tsx#L120-L132 to assert
the configured normalized public URL.

Sources: Coding guidelines, Learnings

packages/core/tests/org/team-service.test.ts (1)

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

Test the issue-preservation contract.

This test only verifies that the team row remains. It passes if archiving deletes or detaches every issue. Create an issue for team, archive the team, then assert that the issue remains with its original teamId.

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/tests/org/team-service.test.ts` around lines 95 - 102, Add an
issue for the created team in the “leaves the issues of an archived team where
they are” test before archiving, then query that issue afterward and assert it
still exists with its original teamId. Keep the existing archived team row
assertions unchanged.

Source: Coding guidelines

apps/web/tests/features/settings/team-settings-panel.test.tsx (1)

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

Assert the member identifier in the POST request.

The recorder only checks the URL and method. This test passes if toggleMembership sends an empty or incorrect request body. Capture init.body and assert that the POST payload contains userId: 'user_2'.

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/settings/team-settings-panel.test.tsx` around lines
75 - 84, Update the test case around toggleMembership to capture the POST
request init.body and assert that the payload includes userId: 'user_2', while
preserving the existing URL and method assertions. Ensure the test would fail if
the member identifier were omitted or incorrect.

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/teams/`[id]/restore/route.ts:
- Around line 8-15: Validate the awaited route params with the appropriate Zod
schema from `@orbit/shared`, extract the validated id, and only then call
restoreTeam in POST. Preserve the existing restore, publish, and response flow
while ensuring malformed path input is rejected at the route validation
boundary.

In `@apps/web/src/components/layout/sidebar-team.tsx`:
- Around line 161-167: Update the team settings Link in the sidebar to use the
same conditional onClick/onNavigate callback pattern as the existing team and
child links, ensuring mobile sidebar closure runs before navigation.

In `@apps/web/src/features/issues/issue-properties.tsx`:
- Around line 331-357: Thread the detail exit callback through IssueProperties
into DeleteIssueRow, accepting an optional leave callback and passing it as
onDeleted to deletion.request. Update the IssueDetailView call site to provide
leave, and add a regression test verifying the callback runs after deletion
confirmation.

---

Nitpick comments:
In `@apps/web/src/features/issues/issue-copy-actions.tsx`:
- Around line 14-15: Update issueUrl in
apps/web/src/features/issues/issue-copy-actions.tsx#L14-L15 to build the issue
path through absoluteUrl() from `@/lib/env.ts`, removing manual origin
concatenation while preserving the /issue/{identifier} path. Update the URL
expectations in
apps/web/tests/features/issues/issue-copy-actions.test.tsx#L120-L132 to assert
the configured normalized public URL.

In `@apps/web/tests/features/settings/team-settings-panel.test.tsx`:
- Around line 75-84: Update the test case around toggleMembership to capture the
POST request init.body and assert that the payload includes userId: 'user_2',
while preserving the existing URL and method assertions. Ensure the test would
fail if the member identifier were omitted or incorrect.

In `@packages/core/tests/org/team-service.test.ts`:
- Around line 95-102: Add an issue for the created team in the “leaves the
issues of an archived team where they are” test before archiving, then query
that issue afterward and assert it still exists with its original teamId. Keep
the existing archived team row assertions unchanged.
🪄 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: 1a65148c-864e-4ec1-b396-95c6c858a61a

📥 Commits

Reviewing files that changed from the base of the PR and between 76302f7 and 12867d7.

📒 Files selected for processing (23)
  • apps/web/AGENTS.md
  • apps/web/CLAUDE.md
  • apps/web/src/app/(app)/team/[key]/settings/page.tsx
  • apps/web/src/app/api/teams/[id]/restore/route.ts
  • apps/web/src/components/layout/sidebar-team.tsx
  • apps/web/src/features/issues/issue-copy-actions.tsx
  • apps/web/src/features/issues/issue-detail.tsx
  • apps/web/src/features/issues/issue-properties.tsx
  • apps/web/src/features/issues/quick-create.tsx
  • apps/web/src/features/settings/team-settings-panel.tsx
  • apps/web/tests/components/layout/sidebar.test.tsx
  • apps/web/tests/features/issues/board.test.tsx
  • apps/web/tests/features/issues/issue-copy-actions.test.tsx
  • apps/web/tests/features/issues/issue-detail-delete.test.tsx
  • apps/web/tests/features/issues/issue-list.test.tsx
  • apps/web/tests/features/issues/issue-properties.test.tsx
  • apps/web/tests/features/issues/my-issues-view.test.tsx
  • apps/web/tests/features/issues/quick-create.test.tsx
  • apps/web/tests/features/settings/team-settings-panel.test.tsx
  • packages/core/src/org/team-service.ts
  • packages/core/tests/org/team-service.test.ts
  • packages/shared/src/utils/index.ts
  • packages/shared/tests/utils/issue-prompt.test.ts

imshashank and others added 2 commits August 8, 2026 16:25
# Conflicts:
#	apps/web/src/features/issues/quick-create.tsx
Deleting from the new properties row left the detail page or the peek
open on an issue that no longer exists, because it dropped the onDeleted
callback the header and the shortcut both pass.

Archiving a team from its own settings page then removed the only route
back to the restore control, so the workspace team list now links to each
team's settings, archived ones included.

Also validate the id on the restore route and run the sidebar navigation
callback when the settings link is followed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions github-actions Bot removed the documentation Docs, the README, or anything that explains Orbit label Aug 8, 2026
@imshashank
imshashank merged commit d6faab6 into main Aug 8, 2026
11 checks passed
@imshashank
imshashank deleted the feat/team-settings branch August 8, 2026 11:03

This branch was successfully deployed

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

Labels

area: issues Issues, lists and boards area: web The Next.js app and its UI tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant