Skip to content

Fix GUI cross-project navigation - #267

Merged
TraderSamwise merged 2 commits into
masterfrom
chore/gui-smoke-next-11
Jun 29, 2026
Merged

Fix GUI cross-project navigation#267
TraderSamwise merged 2 commits into
masterfrom
chore/gui-smoke-next-11

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Smoke-test fix for cross-project GUI navigation.\n\nVerification:\n- Chrome MCP: selected premys, clicked an aimux global inbox row, landed on /project/agent/... with project=/Users/sam/cs/aimux and no console errors.\n- app typecheck\n- app lint (existing warnings only)\n- app vitest\n- build:ui:local\n- push hook: yarn typecheck && yarn lint && yarn test

Summary by CodeRabbit

  • Bug Fixes
    • Notification and thread links now open the correct project/session view more reliably.
    • Selected project state is updated before navigating, reducing mismatches when switching between items.
    • Web and native platforms now use the appropriate navigation behavior, improving consistency across devices.
    • Some links now preserve cleaner, more predictable URL formatting.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 29, 2026 1:09am

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@TraderSamwise, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 43 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e5253ea-e56e-47d0-9fc8-d0a4a6ac133e

📥 Commits

Reviewing files that changed from the base of the PR and between b4b598a and fc13d1d.

📒 Files selected for processing (3)
  • app/app/(main)/global-notifications.tsx
  • app/lib/view-location.test.ts
  • app/lib/view-location.ts
📝 Walkthrough

Walkthrough

Refactors buildViewHref and detailHrefForPath in view-location.ts to produce query-string and dynamic-route Hrefs respectively. Updates GlobalNotificationsScreen, GlobalThreadsScreen, and NativeNotificationRouter to call selectProject before navigation and branch between window.location.assign (web) and router.navigate (native).

Changes

Platform-aware navigation refactor

Layer / File(s) Summary
view-location href builder changes
app/lib/view-location.ts, app/lib/view-location.test.ts
buildViewHref delegates to buildViewPath for query-string Hrefs. detailHrefForPath introduces buildViewHrefObject helper returning { pathname, params } with [sessionId]/[serviceId] template segments. Tests updated to match new string and object-form outputs.
selectProject wiring and web/native navigation in screens
app/app/(main)/global-notifications.tsx, app/app/(main)/global-threads.tsx
Both screens add selectProject via useSetAtom(selectProjectAtom), call it before navigation, and branch on Platform.OS: web uses window.location.assign with buildViewPath; native uses router.navigate with detailHrefForPath or buildViewHref.
NativeNotificationRouter session navigation
app/components/NativeNotificationRouter.tsx
Imports detailHrefForPath and replaces the previous buildViewHref session-navigation call with detailHrefForPath("/project", "agent", sessionId, projectRoot).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • TraderSamwise/aimux#42: Directly modifies detailHrefForPath route handler behavior in view-location.ts, which is the same function being restructured in this PR.
  • TraderSamwise/aimux#59: Introduces the global-notifications.tsx and global-threads.tsx screens whose navigation logic is being updated in this PR.

Poem

🐇 Hop left for web, hop right for native,
The rabbit builds paths, both proud and creative.
selectProject first, then off we go,
Dynamic segments glow in [sessionId]'s show.
Query strings shimmer, the router sings—
Every notification finds its wings! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: fixing cross-project GUI navigation.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/gui-smoke-next-11

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

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

🧹 Nitpick comments (1)
app/app/(main)/global-notifications.tsx (1)

132-139: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Centralize the agent-detail path shape.

The web branch now hard-codes /project/agent/${...}/chat, while the native branch gets that route from detailHrefForPath(...). Consider moving the string-form detail path into view-location.ts too, so both branches stay in sync if the detail route changes again.

🤖 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 `@app/app/`(main)/global-notifications.tsx around lines 132 - 139, The
agent-detail route shape is duplicated between the web branch and the native
branch, which can drift if the route changes. Move the string-based
`/project/agent/.../chat` path construction into view-location utilities
alongside detailHrefForPath, then update global-notifications to use that shared
helper for both window.location.assign and router.navigate so the route stays
centralized.
🤖 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.

Nitpick comments:
In `@app/app/`(main)/global-notifications.tsx:
- Around line 132-139: The agent-detail route shape is duplicated between the
web branch and the native branch, which can drift if the route changes. Move the
string-based `/project/agent/.../chat` path construction into view-location
utilities alongside detailHrefForPath, then update global-notifications to use
that shared helper for both window.location.assign and router.navigate so the
route stays centralized.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 76a4c8ed-7412-4880-bcbe-574f473382e4

📥 Commits

Reviewing files that changed from the base of the PR and between 0285458 and b4b598a.

📒 Files selected for processing (5)
  • app/app/(main)/global-notifications.tsx
  • app/app/(main)/global-threads.tsx
  • app/components/NativeNotificationRouter.tsx
  • app/lib/view-location.test.ts
  • app/lib/view-location.ts

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TraderSamwise
TraderSamwise merged commit 6c698bc into master Jun 29, 2026
3 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