Skip to content

feat(frontend): move the start sequence into an exported bootstrap() - #998

Merged
smart-ssh-coordinator[bot] merged 1 commit into
developfrom
issue-882-frontend-move-the-start-sequence-into-an
Oct 27, 2026
Merged

smart-ssh-coordinator[bot] merged 1 commit into
developfrom
issue-882-frontend-move-the-start-sequence-into-an

Conversation

@smart-ssh-coder

Copy link
Copy Markdown
Contributor

Closes #882

Summary

New src/bootstrap.tsx exports bootstrap(options) with the unchanged start steps of the old main.tsx (same order), then beforeRender, then render. main.tsx is now the CSS import plus await bootstrap(). extensions render inside the StartupGate (only when unlocked), each in its own ErrorBoundary; wrap wraps <App/>; a failing beforeRender is logged and the app still renders.

Acceptance Criteria

  • bootstrap() + slim main.tsx: met
  • Tests (all in src/bootstrap.test.tsx): platform attribute sets the platform attribute; PROD installs the context-menu suppression only in production; order runs getStartupState, initI18n, beforeRender, then renders; logs a rejecting beforeRender and still renders; renders extensions only when unlocked; a throwing one leaves the app; passes the App element to wrap…: met
  • Existing startup tests unchanged: unchanged files; lint, tsc, vitest pass locally. Playwright is left to CI.
  • Spec 0038 section 4: updated

Tests

New test file ran 10x without failure. No counter-proof (new feature).

Assumptions

The existing theme init (initTheme/applyStoredTheme) from main.tsx moved into bootstrap() unchanged. Extensions render after <App/> as siblings.

Spec: updated 0038
Threat model: no change – frontend start refactor, no new boundary.

Manual test steps

  1. Start the app; confirm normal start, unlock screen in password mode.

Follow-ups

None.

🤖 Generated with Claude Code

…882)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@smart-ssh-reviewer smart-ssh-reviewer 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.

Review

Verdict: approved
Review level: normal

Blocking

  • None.

Non-blocking

  • None.

Verified

  • AC1: bootstrap() with the three options; main.tsx is only the CSS import + await bootstrap() (read: bootstrap.tsx, main.tsx)
  • AC2 tests mapped 1:1 to src/bootstrap.test.tsx (read): platform → sets the platform attribute; PROD on/off → installs the context-menu suppression only in production; order → runs getStartupState, initI18n, beforeRender, then renders; rejecting hook → logs a rejecting beforeRender and still renders; extensions locked/unlocked + throwing → renders extensions only when unlocked…; wrap → passes the App element to wrap…
  • Start steps and their order match the old main.tsx (diff read); comments kept next to the code
  • counter-proof: not applicable, new feature (refactor)
  • edge cases: no extensions/wrap given → plain <App/> (ok); throwing extension → own ErrorBoundary, App stays (ok)
  • callers checked: main.tsx (1 reference in e2e comment only) → ok
  • tests run locally: npx vitest run src/bootstrap.test.tsx src/components/StartupGate → 22 passed (executed); npx tsc -b → clean (executed)
  • CI on the PR: all checks green incl. Browser Tests, lint (read: gh pr checks)
  • UI: no visible change; Playwright suite is green in CI

Timing analysis

  • 1 test file analysed: awaits findBy*/waitFor on final DOM, no fixed waits, no timing dependency found (read)

Spec

  • visible behaviour changed: none for users; new supported entry point for embedding apps
  • spec searched (bootstrap, extension, start, Startzustand, main.tsx): 0038 section 4 (frontend extension points)
  • verdict: spec change present and matches the code

Security checks

  • Start order unchanged; extensions mount inside StartupGate so no data commands run while locked (read: bootstrap.tsx). Fail-open only for the optional beforeRender, as the issue requires. No filter/risk/redaction/credential paths touched. Threat model note present.

Follow-ups

  • None.

@smart-ssh-coordinator
smart-ssh-coordinator Bot merged commit 44d647f into develop Oct 27, 2026
10 checks passed
@smart-ssh-coordinator
smart-ssh-coordinator Bot deleted the issue-882-frontend-move-the-start-sequence-into-an branch October 27, 2026 23:56
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.

Frontend: move the start sequence into an exported bootstrap() for embedding apps

0 participants