Skip to content

revert: v2 workspace loading screen animation (#3788)#3820

Merged
Kitenite merged 1 commit into
mainfrom
debug-crashes-animation-m
Apr 28, 2026
Merged

revert: v2 workspace loading screen animation (#3788)#3820
Kitenite merged 1 commit into
mainfrom
debug-crashes-animation-m

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Apr 28, 2026

Summary

Reverts #3788 — the v2 workspace keypad loading screen.

Suspected as the source of crashes folks are seeing in 1.7.0. The new /v2-workspace-loading/$workspaceId route and the workspace layout query different collections for isReady (layout joins v2Workspaces+v2Hosts; loading page only reads v2Workspaces), so when v2Hosts hydrates after v2Workspaces the two effects can ping-pong navigations on cold start.

Reverts back to the prior behavior where the layout returns null while not ready.

Test plan

  • Cold-launch with empty v2 cache → workspace opens without freeze/redirect-loop
  • Open existing workspace → no flicker
  • Workspace creation (fork / checkout / adopt) — pending page still renders progress
  • Crash reports in Sentry settle on the next release

Summary by cubic

Reverts the v2 workspace loading screen and route to stop cold-start crashes and redirect loops in 1.7.0. The layout now waits inline until data is ready, and the pending page shows a simple progress list.

  • Bug Fixes

    • Removed /v2-workspace-loading/$workspaceId to eliminate ping-pong navigation when v2Hosts and v2Workspaces hydrate out of order.
    • v2-workspace layout no longer redirects while not ready; it returns null to avoid startup freeze/flicker.
  • Refactors

    • Simplified pending workspace page: replaced keypad animation with an inline step list, stale-duration hint, and clear success/sync-timeout states (with Dismiss/Keep waiting/Open anyway actions).
    • Deleted keypad loader components, styles, and image assets.

Written for commit c9eabba. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • New Features

    • Redesigned workspace loading UI with step-by-step progress display featuring visual indicators for completed, active, and pending steps.
    • Added sync-timeout recovery panel with options to continue waiting or proceed anyway.
  • Bug Fixes

    • Improved status handling for workspace creation and success states.
  • Style

    • Updated visual styling for loading progress indicators and workspace state displays.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

The pull request removes the keypad-based and step-progress loading UI components, deletes the v2-workspace-loading route, and replaces it with a custom progress UI in the pending workspace page that directly maps host-service progress steps. Navigation logic is simplified to return null instead of redirecting.

Changes

Cohort / File(s) Summary
KeypadLoader Removal
KeypadLoader.css, KeypadLoader.tsx, KeypadLoader/index.ts
Deletes keypad-style loader UI component including 3D transform styling, per-key geometry/masking, press animations, and React component logic.
StepProgress Removal
StepProgress.css, StepProgress.tsx, StepProgress/index.ts
Removes step-order display component with state machine, timed hold behavior, animated transitions, and ellipsis animations.
V2WorkspaceLoadingView Removal
V2WorkspaceLoadingView.tsx, V2WorkspaceLoadingView/index.ts
Deletes wrapper component that composed KeypadLoader and StepProgress with auto-incrementing step animation on interval.
v2-workspace-loading Route Removal
v2-workspace-loading/$workspaceId/page.tsx
Removes dedicated loading route that queried workspaces and performed navigation to final workspace route.
Pending Page Progress UI
pending/$pendingId/page.tsx
Replaces keypad loader with custom step-by-step progress list driven by host-service steps; done steps show checkmarks, active show pulsing indicator, others show muted dots; handles sync-timeout recovery and success states with optional warnings.
Workspace Layout Navigation
v2-workspace/layout.tsx
Removes client-side redirect to dedicated loading route; now returns null during prerequisite loading instead.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 The keypad rests, its keys now quiet,
Step progress fades to code diet.
Host-service steps now lead the way,
With checkmarks bright to mark the day,
Pending's progress, clean and true! ✨

🚥 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 'revert: v2 workspace loading screen animation (#3788)' clearly and concisely describes the main change—reverting the keypad loading screen from PR #3788.
Description check ✅ Passed The description is comprehensive, explaining the root cause (ping-pong navigation from mismatched readiness checks), the solution (reverting to null-return behavior), and includes a test plan with four specific scenarios to validate the fix.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch debug-crashes-animation-m

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 and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR reverts the v2 workspace keypad loading screen (#3788) to fix crashes in 1.7.0 caused by a ping-pong navigation loop. The core fix is in layout.tsx: removing the useEffect that redirected to /v2-workspace-loading/$workspaceId when !isReady; the layout now returns null while data hydrates. All V2WorkspaceLoadingView components (KeypadLoader, StepProgress, assets, route page) are deleted, and pending/$pendingId/page.tsx is updated to render step progress inline using the raw host-service step data directly.

Confidence Score: 5/5

Safe to merge — cleanly reverts the crash-inducing route and restores the null-return pattern while adding a functional inline progress UI.

All changes are P2 or lower. The root-cause fix (removing the ping-pong useEffect in layout.tsx) is minimal and correct. The deleted route and components are fully de-referenced. The replacement inline UI in pending/page.tsx is straightforward and preserves all prior UX states (creating, succeeded, sync-timed-out, failed).

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx Core fix: removes the useEffect that navigated to /v2-workspace-loading/ when !isReady, eliminating the ping-pong redirect loop; now returns null while collections hydrate.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/pending/$pendingId/page.tsx Replaces the keypad-based loading UI with inline step progress using raw host-service step data; adds HiCheck import, removes V2WorkspaceLoadingView and mapHostProgressToInitStep; Dismiss button retained during creating status.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/page.tsx Entire route deleted; was the source of the isReady mismatch (queried only v2Workspaces, not v2Hosts) that triggered navigation loops.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/V2WorkspaceLoadingView.tsx Deleted: the main keypad loading view wrapper component that composed KeypadLoader and StepProgress.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/KeypadLoader.tsx Deleted: the animated 3D keypad loader component with per-step key press animations.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/StepProgress.tsx Deleted: the animated step-scroll progress indicator component.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User navigates to /v2-workspace/:workspaceId] --> B{isReady?}
    B -- "Before PR" --> C["useEffect → navigate to /v2-workspace-loading/:workspaceId"]
    C --> D[Loading page reads only v2Workspaces]
    D --> E{isReady in loading page?}
    E -- "v2Workspaces ready, v2Hosts not" --> F["navigate back to /v2-workspace/:workspaceId"]
    F --> B
    B -- "v2Hosts not ready" --> C
    C -.->|"Ping-pong loop!"| F
    B -- "After PR" --> G["return null (wait silently)"]
    G --> H[Both collections hydrate]
    H --> I[isReady = true → render workspace]
Loading

Reviews (1): Last reviewed commit: "Revert "Migrate v1 keypad loading screen..." | Re-trigger Greptile

@Kitenite Kitenite merged commit 89285e4 into main Apr 28, 2026
6 of 7 checks passed
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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/desktop/src/renderer/routes/_authenticated/_dashboard/pending/`$pendingId/page.tsx:
- Around line 281-282: The progress gate currently sets intentHasProgress based
only on pending?.intent === "fork" || pending?.intent === "checkout", which
excludes the "pr-checkout" flow; update the intentHasProgress check (the
variable declared as intentHasProgress) to also include pending?.intent ===
"pr-checkout" so that flows handled by checkoutWorkspace() in useFireIntent
display the host-service progress steps instead of the generic spinner.
🪄 Autofix (Beta)

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

Review profile: CHILL

Plan: Pro

Run ID: e0dc42d0-79e7-4fb6-8e38-55012fa6336c

📥 Commits

Reviewing files that changed from the base of the PR and between fea591e and c9eabba.

⛔ Files ignored due to path filters (2)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/assets/key-single.png is excluded by !**/*.png
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/assets/keypad-base.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/pending/$pendingId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/KeypadLoader.css
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/KeypadLoader.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/StepProgress.css
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/StepProgress.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/V2WorkspaceLoadingView.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/layout.tsx
💤 Files with no reviewable changes (9)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/KeypadLoader.css
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/StepProgress.css
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/StepProgress/StepProgress.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/V2WorkspaceLoadingView.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace-loading/$workspaceId/components/V2WorkspaceLoadingView/KeypadLoader/KeypadLoader.tsx

Comment on lines 281 to 282
const intentHasProgress =
pending?.intent === "fork" || pending?.intent === "checkout";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Include pr-checkout in the progress gate.

pr-checkout goes through checkoutWorkspace() in useFireIntent, but this condition excludes it, so that flow falls back to the generic spinner instead of showing host-service steps like normal checkout.

Suggested fix
-	const intentHasProgress =
-		pending?.intent === "fork" || pending?.intent === "checkout";
+	const intentHasProgress =
+		pending?.intent === "fork" ||
+		pending?.intent === "checkout" ||
+		pending?.intent === "pr-checkout";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const intentHasProgress =
pending?.intent === "fork" || pending?.intent === "checkout";
const intentHasProgress =
pending?.intent === "fork" ||
pending?.intent === "checkout" ||
pending?.intent === "pr-checkout";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/pending/`$pendingId/page.tsx
around lines 281 - 282, The progress gate currently sets intentHasProgress based
only on pending?.intent === "fork" || pending?.intent === "checkout", which
excludes the "pr-checkout" flow; update the intentHasProgress check (the
variable declared as intentHasProgress) to also include pending?.intent ===
"pr-checkout" so that flows handled by checkoutWorkspace() in useFireIntent
display the host-service progress steps instead of the generic spinner.

Comment on lines +478 to +483
<button
type="button"
className="rounded-md border px-3 py-1.5 text-sm hover:bg-accent"
onClick={doNavigate}
>
Open anyway
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Open anyway still routes into the unsynced not-found path.

This button is only rendered when !workspaceSynced, but doNavigate() pushes to /v2-workspace/$workspaceId, and that route still resolves the workspace from collections.v2Workspaces before it can render. In the timeout case, this recovery action commonly lands on WorkspaceNotFoundState instead of opening the workspace.

@Kitenite Kitenite deleted the debug-crashes-animation-m branch April 28, 2026 02:44
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

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.

2 participants