Skip to content

Improve project startup restore and loading experience#215

Merged
DeadWaveWave merged 5 commits intomainfrom
feat/optimization-project-loading
May 1, 2026
Merged

Improve project startup restore and loading experience#215
DeadWaveWave merged 5 commits intomainfrom
feat/optimization-project-loading

Conversation

@DeadWaveWave
Copy link
Copy Markdown
Owner

@DeadWaveWave DeadWaveWave commented May 1, 2026

💡 Change Scope

  • Small Change: Fast feedback, localized UI/logic, low-risk.
  • Large Change: New feature, cross-boundary logic, runtime-risk (persistence, IPC, lifecycle, recovery).

📝 What Does This PR Do?

Improves the project startup experience in three places:

  • unblocks first paint from terminal scrollback hydration so restored projects appear faster;
  • adds a boot boundary so startup shows a dedicated loading state instead of briefly flashing an empty Space/project page;
  • polishes that loading state into a calmer, more window-like visual transition.

This keeps startup responsive without regressing recovery semantics for restored workspaces, Spaces, and terminals.


🏗️ Large Change Spec (Required if "Large Change" is checked)

1. Context & Business Logic

Startup restore was mixing two concerns: durable workspace recovery and expensive terminal scrollback hydration. That made project open feel slower, and the shell could momentarily render an empty state before restore completed. This PR keeps recovery behavior intact while decoupling first paint from non-critical scrollback work and presenting a dedicated loading surface until the persisted shell is actually ready.

2. State Ownership & Invariants

  • isPersistReady in the renderer shell remains the authoritative boot gate for whether the real app shell can render.
  • Durable restored workspace topology remains owned by persisted app state; terminal scrollback hydration must not block initial shell paint.
  • WorkspaceEmptyState must only render after boot is ready and there is truly no restored/open workspace to show.
  • App/workspace shortcuts must stay disabled until boot readiness is resolved, so startup cannot route input into an incomplete shell.

3. Verification Plan & Regression Layer

  • Integration: tests/integration/recovery/useHydrateAppState.scrollback-ownership.spec.tsx
  • Unit: tests/unit/app/appShellBootBoundary.spec.tsx
  • E2E readiness stabilization: tests/e2e/workspace-canvas.helpers.ts
  • Full gate: pnpm pre-commit ✅ (208 passed, 45 skipped)
  • Additional targeted checks during implementation: startup boundary unit test, pnpm build, and Electron Playwright smoke for workspace search startup path.

✅ Delivery & Compliance Checklist

  • My code passes the ultimate gatekeeper: pnpm pre-commit is completely green.
  • I have signed the CLA if required (see CLA.md).
  • I have included new tests to lock down the behavior (or explicitly stated why it's untestable).
  • I have strictly adhered to the DEVELOPMENT.md architectural boundaries.
  • I have attached a screenshot or screen recording (if this touches the UI).
  • I have updated the documentation accordingly (if adding a feature or changing a contract).

📸 Screenshots / Visual Evidence

Startup loading screen updated; screenshot upload pending in PR UI.

@DeadWaveWave DeadWaveWave merged commit a3f50bf into main May 1, 2026
7 checks passed
@DeadWaveWave DeadWaveWave deleted the feat/optimization-project-loading branch May 1, 2026 12:00
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