Skip to content

1.14 Build the UI shell with empty slots #15

Description

@goofmint

Part of Phase 1 — Core skeleton (tasks.md Task 1.14).

Summary

Build the OpenTUI/React UI shell: layout regions, slot registry, focus-to-context tracking, and layout persistence.

Details

  • Component tree (design.md §8.1): ThemeProvider (hardcoded base palette for now) → ContextFocusTrackerShell with ActivityBar, Sidebar, EditorArea (tab bar + placeholder), Panel, StatusBar.
  • Slot registry backing tecode.ui.registerView(slot, id, Component): per-slot ordered maps; regions re-render on registration; activityBar items pair 1:1 with sidebar views; status-bar items carry { side, priority } and render sorted.
  • Focus tracking maps OpenTUI focus to context keys (editorFocus, etc.).
  • Layout state { sidebarVisible, sidebarWidth, panelVisible, panelHeight, activeView } persists to ~/.config/tecode/state.json (debounced + on exit) and restores on start.

Completion requirements

  • Headless-renderer snapshot: empty shell renders all regions
  • Registering a view via the API re-renders its region (snapshot before/after)
  • Status-bar side/priority ordering verified
  • Layout state round-trips through state.json across a simulated restart
  • Focus changes update context keys (asserted through the context service)
  • bun test and lint pass

References

  • requirements.md: Req 6.1–6.4
  • design.md: §8.1, §8.2

Dependencies

Blocked by: 1.13 (#14).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions