Fix feature deep link with project path handling#834
Fix feature deep link with project path handling#834gsxdsm merged 2 commits intoAutoMaker-Org:v1.0.0rcfrom
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughDeep-linking now consistently carries Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Notification as Notification Bell
participant Router as Router (/board)
participant BoardView
participant ProjectInit as initializeProject
participant ProjectStore as Project Store
participant BoardLogic as Worktree/Board Logic
User->>Notification: Click (featureId + projectPath)
Notification->>Router: Navigate to /board?featureId=...&projectPath=...
Router->>BoardView: Render with initialFeatureId + initialProjectPath
alt initialProjectPath differs from current
BoardView->>ProjectInit: initializeProject(initialProjectPath)
ProjectInit-->>BoardView: project data
BoardView->>ProjectStore: upsertAndSetCurrentProject(path, name)
ProjectStore-->>BoardView: currentProject updated
end
BoardView->>BoardLogic: Resolve worktrees (retry loop)
BoardLogic->>BoardLogic: Select targetWorktree
BoardView->>BoardLogic: Switch worktree (wrapped in startTransition)
BoardLogic-->>User: Board shows feature in target project
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the application's stability, performance, and user experience, particularly for deep linking and mobile usage. It introduces robust handling for deep links, ensuring seamless navigation across projects and features, even in cold-start scenarios. Critical performance bottlenecks on mobile devices, especially during worktree switches, have been addressed through query staggering and React concurrency optimizations. Furthermore, the PR enhances Git integration with better worktree management, including detection and resolution of orphaned features, and introduces server-side persistence for development server states. The agent output display is also upgraded to provide a comprehensive, accumulated summary for multi-step pipelines. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This is an impressive and substantial pull request that delivers significant improvements across the board. The core goal of fixing cross-project deep linking is well-executed, with robust server-side logic for ntfy URLs and resilient client-side handling that accounts for project switching and potential race conditions. The performance enhancements, particularly the clever query staggering on mobile to prevent crashes, are excellent. Furthermore, the backend has been considerably hardened with more reliable git command execution, persistent state for dev servers, and better error handling. The addition of features like orphaned worktree management and accumulated pipeline summaries demonstrates a deep consideration for user experience and data integrity. The code quality is high, and the extensive new tests provide confidence in these complex changes.
Note: Security Review did not run due to the size of the PR.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/ui/src/components/views/board-view.tsx`:
- Around line 345-346: The current projectName extraction uses
initialProjectPath.split('/') which fails on Windows paths; update the
assignment for projectName to split on both forward and backward slashes (e.g.
use initialProjectPath.split(/[\\/]/).filter(Boolean).pop() ||
initialProjectPath) so it correctly returns the basename on all platforms,
keeping the existing fallback; locate the assignment of projectName in
board-view.tsx and replace the '/' split logic accordingly.
In
`@apps/ui/src/components/views/board-view/components/kanban-card/agent-info-panel.tsx`:
- Around line 167-189: The effect uses mountReady initialized with
isActivelyRunning but doesn’t react to later changes of isActivelyRunning, so
add isActivelyRunning to the useEffect dependency list and handle the case where
isActivelyRunning turns true: if isActivelyRunning becomes true, cancel any
pending timeout/timer and immediately call setMountReady(true), ensuring any
acquired slot is released (use releaseMobileQuerySlot if a slot was held or
avoid acquiring one). Update logic around
acquireMobileQuerySlot/releaseMobileQuerySlot and the timer so changing
isActivelyRunning mid-stagger bypasses the delay and cleans up resources.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b1cb3871-3997-4fce-b6b7-497425488ea1
📒 Files selected for processing (8)
apps/server/src/services/event-hook-service.tsapps/ui/src/components/layout/project-switcher/components/notification-bell.tsxapps/ui/src/components/views/board-view.tsxapps/ui/src/components/views/board-view/components/kanban-card/agent-info-panel.tsxapps/ui/src/components/views/notifications-view.tsxapps/ui/src/components/views/overview/recent-activity-feed.tsxapps/ui/src/routes/board.lazy.tsxapps/ui/src/routes/board.tsx
| const [mountReady, setMountReady] = useState(!isMobileDevice || !!isActivelyRunning); | ||
| useEffect(() => { | ||
| if (mountReady) return; | ||
| let cancelled = false; | ||
| const delay = Math.random() * MOBILE_STAGGER_WINDOW_MS; | ||
| const timer = setTimeout(() => { | ||
| // After the random delay, also wait for a concurrency slot | ||
| acquireMobileQuerySlot().then(() => { | ||
| if (!cancelled) { | ||
| setMountReady(true); | ||
| // Release the slot after a brief window to let the initial queries fire | ||
| // and return, preventing all slots from being held indefinitely | ||
| setTimeout(releaseMobileQuerySlot, 3000); | ||
| } else { | ||
| releaseMobileQuerySlot(); | ||
| } | ||
| }); | ||
| }, delay); | ||
| return () => { | ||
| cancelled = true; | ||
| clearTimeout(timer); | ||
| }; | ||
| }, [mountReady]); |
There was a problem hiding this comment.
isActivelyRunning changes after mount won't bypass the stagger delay.
The initial mountReady state captures isActivelyRunning at mount time, but subsequent changes to this prop won't short-circuit the stagger since isActivelyRunning isn't in the effect's dependency array.
Edge case: if a feature transitions to in_progress while its panel is still waiting in the stagger queue, the user won't see real-time updates until the random delay + slot acquisition completes (up to ~9 seconds worst case).
This is likely acceptable given the rarity of this scenario and the complexity of adding reactivity, but worth documenting if users report delayed updates on actively running features after a worktree switch.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@apps/ui/src/components/views/board-view/components/kanban-card/agent-info-panel.tsx`
around lines 167 - 189, The effect uses mountReady initialized with
isActivelyRunning but doesn’t react to later changes of isActivelyRunning, so
add isActivelyRunning to the useEffect dependency list and handle the case where
isActivelyRunning turns true: if isActivelyRunning becomes true, cancel any
pending timeout/timer and immediately call setMountReady(true), ensuring any
acquired slot is released (use releaseMobileQuerySlot if a slot was held or
avoid acquiring one). Update logic around
acquireMobileQuerySlot/releaseMobileQuerySlot and the timer so changing
isActivelyRunning mid-stagger bypasses the delay and cleans up resources.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
projectPathas a URL param so clicking a link from a different project automatically switches to the correct project before opening the feature modalevent-hook-service.tsnow always includesprojectPathin ntfy click URLs (previously only set the path whenfeatureIdwas present, silently dropping it for non-feature notifications)projectPathas an optional search param to the board route (board.tsx/board.lazy.tsx)startTransitionwrapping: AllsetCurrentWorktreecalls (deep link switching, board error recovery) are now wrapped instartTransitionto batch Zustand store mutations with concurrent React updates — fixes React error fixing worktree style #185 cascades on mobile Safari/PWAAgentInfoPanelgains a two-layer mobile stagger system — random 0–6 s delay + a global concurrency slot limiter (max 4 simultaneous queries) — preventing the 60–100+ concurrent API calls that crash mobile Safari when switching to a worktree with many cardsinvalidateQueriesinAgentInfoPanelnow only fires when cached data exists AND is stale (>10 s); on mobile it is skipped entirely since the staggered queries already fetch fresh dataTest plan
featureId— confirm it still navigates to/boardwith the correct project?featureId=xxx&projectPath=yyyin a fresh tab) — confirm it loads without hanging on the loading screenhandleBoardRecover) — confirm board reloads cleanly without a secondary crashSummary by CodeRabbit
New Features
Improvements