Skip to content

1.15 Wire the startup sequence in cli #16

Description

@goofmint

Part of Phase 1 — Core skeleton (tasks.md Task 1.15). Closes out Phase 1.

Summary

Wire everything into the real startup sequence with first paint before any extension code runs.

Details

  • Argv parsing: file or directory argument.
  • Sync-before-first-frame phase (< 100 ms budget, Req 12.2): load config + keybindings, terminal capability detection stub (real detection in Task 4.2), render the Shell with empty slots and placeholder editor area.
  • Deferred phase (queueMicrotask after first frame): discovery → registration → onStartup activations → open the argv file/directory (fires onLanguage:*).
  • Startup-to-first-frame timing instrumentation (also feeds the CI check in Task 4.5).

Completion requirements

  • Integration test proves the shell renders before any extension index.ts loads (module-load spy)
  • Startup order matches Req 12.1 exactly (config → discover → register → lazy activate → render → open)
  • Timing check passes with headroom over the 100 ms first-frame budget on CI hardware
  • bun run cli <dir> opens the empty shell interactively (manual smoke test)
  • bun test and lint pass

Phase 1 exit criterion: bun run cli opens the empty shell with working command registry, keymap, documents (headless), and config.

References

  • requirements.md: Req 12.1, 12.2
  • design.md: §3, §15

Dependencies

Blocked by: 1.14 (#15).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions