Skip to content

feat(navigation): open the web's /command-center/<section> addresses - #79

Merged
AutomatosAI merged 1 commit into
mainfrom
feat/command-center-section-links
Dec 4, 2026
Merged

AutomatosAI merged 1 commit into
mainfrom
feat/command-center-section-links

Conversation

@AutomatosAI

@AutomatosAI AutomatosAI commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

What

The web app (automatos-ai PRD-292) is moving Command Center's tabs to their own addresses: /command-center (Summary), /command-center/board, /calendar, /activity, /watchlist, /questions, /governance. A ticket link becomes /command-center/board?task_id=<n>[&question=<id>].

Go now opens both forms the same way. The old ?tab= form is unchanged, because stored rows keep it forever.

How

  • web-links.ts:
    • routeFor checks first for /command-center/<section>.
    • The section is the one segment after the path, taken as written and never decoded. So an encoded slash, .., bo%61rd or Board is not a section; those links go where an unknown tab goes.
    • The query is read by readQuery, limited to task_id and question, with the same limits as the query form: at most 16 pairs, no repeated name, values up to 512 characters. A section longer than 512 characters is refused.
    • A path-form link whose query names tab (written or escaped) is refused, the stricter of ignoring and refusing.
    • The tab-to-screen table moved into tabRoute, which both forms use.
  • /command-center/* was already covered by the universal-link association (docs/release/association.json, app.json pathPrefix). No change there, and no native change.

Go still builds two links of its own on the old form: STUDIO_CALENDAR_PATH and GOVERNANCE_HREF. The web redirects them.

Order

Core writes new-form links from the backend (ticket receipts, activity rows) only after a build with this change is on phones. This PR is that first step.

Follows / deviates

Follows the link-table pattern (rule 5.2): one table, rebuilt routes, ids held to isUsableId. No deviation.

Verified

Run on this branch, using the pure-Node checks allowed by CLAUDE.md:

  • npx vitest run: 589 files, 10,894 tests passed.
  • npm run typecheck: clean.
  • npm run lint: 0 errors. The two warnings are in files this PR does not touch (src/cc/strings.ts, src/styles/strings.ts).

Not checked: on a device.

AI-assisted (Claude Code).

Summary by CodeRabbit

  • New Features
    • Command Centre links now support section-based URLs for Board, Summary, Questions, and Calendar, alongside existing tab-based links.
    • Board links can open a specific ticket, including links that identify a question.
    • Existing links continue to open the corresponding section, and unsupported or invalid link details are handled without opening an incorrect ticket.

Core PRD-292 moves Command Center's tabs to their own addresses
(/command-center/board?task_id=<n>, /command-center/questions, ...).
Both forms now map to the same screens; the old ?tab= form is unchanged.
The section is taken as written (never decoded), the query keeps
readQuery's limits, and a path-form link that also names tab is refused.
Core writes new-form links only after this ships.

Signed-off-by: Gerard Kavanagh <gerard@automatos.app>
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Command Centre links now support section paths alongside legacy tab-query links. Both forms use the same route mapping. Section paths apply query and length checks, and navigation tests cover supported routes and invalid inputs.

Changes: Command Centre links

Layer / File(s) Summary
Shared tab mapping and section resolver
src/navigation/web-links.ts
The legacy tab handler and section-path handler use the same tab mapping. Section paths are checked for length and permitted query parameters.
Route dispatch and link validation
src/navigation/web-links.ts, src/navigation/__tests__/*
Route dispatch checks section paths before exact route lookup. Tests cover supported sections, invalid paths and queries, and task ID handling.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Possibly related PRs

Suggested reviewers: gerard161-site

Merge Risk: Minimal · up to 2c4b0

This change lets the app open the web's /command-center/

links and maps them to the same screens as the existing ?tab= links. Legacy links keep working. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(navigation): open the web's /command-center/
addresses" names the main change: the app now opens web links in the /command-center/
form, mapped to the same screens as…
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.
Full details: Title check

Explanation

The title "feat(navigation): open the web's /command-center/<section> addresses" names the main change: the app now opens web links in the /command-center/<section> form, mapped to the same screens as the existing ?tab= links. The raw summary and objectives confirm this change in web-links.ts and the three new test files. The title is specific and concise, and it follows conventional commit style.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cbb51469-3879-4c79-9d6b-6ca8afec56fc
Commits

Reviewing files that changed from the base of the PR and between d32ca3e and 2c4b097.

Files selected for processing: 4

  • src/navigation/__tests__/link-rules.test.ts
  • src/navigation/__tests__/system-links.test.ts
  • src/navigation/__tests__/web-links.test.ts
  • src/navigation/web-links.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@AutomatosAI
AutomatosAI merged commit fa78b3e into main Dec 4, 2026
5 checks passed
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