Commit Graph

13 Commits

Author SHA1 Message Date
Calic
a49aa3ef2b fix(launcher): wire FSM dispatch + correct conflict-count
The conflict-modal path bypassed the FSM extension landed in L.7:
panels/detail.lua set ctx.modal_open directly and init.lua drove
modal handling off the side-channel field, so STATE_MODAL_CONFLICT
was unreachable at runtime (only the test-lib asserts exercised it).
Now detail.lua marks ctx._pending_modal_open and init.lua dispatches
the open_conflict event so state actually transitions through the
fsm. Modal entry/exit is gated on state == STATE_MODAL_CONFLICT.

Also fixes the conflict body line: r.missing doesn't exist on the
dep-fetcher result; use #(errors) + #(conflicts) for the count
displayed in the modal body.
2026-06-11 03:10:56 +02:00
Calic
89b7b060d1 feat(launcher): launch button + dep-conflict modal
Detail-panel bottom-right Launch button: switches to the selected
module via engine.switch_module if dep-check is clean, otherwise
opens a modal listing conflicts with Cancel + 'Launch anyway'. The
latter is greyed out unless engine.module.switch_module_supports_fallback
is exposed (separate engine slice). FSM adds STATE_MODAL_CONFLICT
with transitions to/from STATE_LIST via cancel/launch_anyway/esc.

Generic panels/modal.lua takes a def-table (title/body/buttons) and
returns the clicked button id from handle_click; reusable for future
modals beyond the conflict case.
2026-06-11 02:54:55 +02:00
Calic
10d0ab6529 feat(launcher): render news.md in detail panel for news entry
Static 'coming soon' stub authored as Markdown with JSON-frontmatter
title. Loaded once on init, parsed via the same fm + md helpers as
modules. Live news (Gitea-API or RSS) deferred — single-source-of-
truth in the launcher repo keeps update-pace under our control.
2026-06-11 02:39:01 +02:00
Calic
94b55c42f2 feat(launcher): hero carousel with auto-rotate + manual nav
panels/carousel.lua holds per-module state (index, timer, manual pause,
texture cache). Auto-rotate at carousel_interval_seconds (5s default,
frontmatter-overrideable). Click on overlay arrows steps and pauses
auto-rotate for 30s. Max 7 indicator dots, then 'X / N' overlay (L-Q4).
Single-teaser hides the arrows and dots. Zero-teaser falls through to
ctx.default_teaser_texture which L.10 ships.
2026-06-11 02:26:09 +02:00
Calic
0a96b009f1 feat(launcher): render detail panel content (title/desc/deps)
panels/detail.lua now renders the selected module's title, version,
author, markdown description, and per-dep status list with OK/WARN/ERR
glyphs. Dep-list order follows manifest.module::deps[] (L-Q6 load-
order, no re-sort). Whole-list bg-tint is bubbled to ctx.list_tint so
the list panel picks up a yellow/red ambient cue for warn/error
states. Hero strip remains a placeholder until L.5.
2026-06-11 02:09:04 +02:00
Calic
d63dd91bb6 feat(launcher): cache manifest.launcher.md per module on init
manifest_loader.load_for(id) reads <install>/modules/<id>/
manifest.launcher.md via engine.module.read_file, runs the JSON
frontmatter through frontmatter.parse, and pre-parses the body via
markdown.parse. Cached on the shared ctx so the detail-panel render
loop does not pay the parse cost per frame. Missing files degrade to
{_missing=true} and the list falls back to the module's name/id.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-11 01:58:38 +02:00
Calic
f2b2a8859b refactor(launcher): remove dead button-list helpers after panel refactor
draw_module_row, tooltip_for, and apply_update were the v0.2.0
button-list rendering helpers. The master-detail panel refactor in
41b28ff moved rendering into panels/list.lua + panels/detail.lua,
leaving these three functions with no call sites. Also drops the
now-unused icons import and ICON_GAP/ICON_STRIP_W constants that only
the deleted helpers referenced; FONT_BUTTON, COLOR_DIM and COLOR_MODAL
stay because the quit-confirm modal still uses them.

Verified by grep that none of the removed symbols have remaining
references in init.lua or sibling files. CI boot is clean:
init ok, modules=6 + BOOTING -> RUNNING -> SHUTTING_DOWN, no FATAL.

init.lua drops 443 -> 302 lines; function count drops 14 -> 11.
2026-06-11 01:52:51 +02:00
Calic
332a37e155 feat(launcher): wire panels into master-detail layout
Replaces the centered-button list with a 1/3 list + 2/3 detail split
driven by panels/list.lua and panels/detail.lua. The shared ctx_panels
table threads UI state (selected_entry, scroll_y, modal_open, etc.)
through both panels. Existing dep + update checks remain on the module
entries; FSM and ESC-quit flow unchanged. Detail-panel content is still
a stub until L.4-L.7.
2026-06-11 01:44:29 +02:00
Calic
8b833bbb35 launcher 0.2.0: inline status icons + classified update-check + token auth wire
- Async update-check per module on init (git.start_ls_remote_tags),
  polled per frame. Result classified into available / no-update /
  fail / local-only via the new kind field from lib-core.git 0.2.0.
- Pre-emptive dep-check per module (depf.ensure_for_module) on init
  populates a dep_check_result whose ok/conflicts/warnings/errors
  drive the icon strip.
- Inline icon strip per module-row (icons.lua): rotating ASCII
  spinner while pending, yellow warn for auth/network failures or
  dirty deps, blue update-badge with target version (clickable to
  trigger fetch+checkout), red error for dep-check conflicts, gray
  L for repos that genuinely don't exist on the server. Tooltip on
  hover shows the specific reason per icon.
- Click handler splits launch-vs-update by hit-testing the badge
  rect before the row rect. Launch is blocked when dep-check failed.
- On init, reads engine.config("gitea_token") and forwards via
  git.set_token so users can persist their token in their user-data
  engine.json layer instead of using an env var.
- New deps: lib-core.git 0.1.0, lib-management.dep-fetcher 0.1.2.
2026-05-31 14:09:39 +02:00
Calic
4d91a5ffde rename to lib-management.launcher (was lib-sporel.launcher)
Per ADR-0045 (three-tier library naming) the launcher migrates from
the retired lib-sporel.* prefix to the new lib-management.* tier for
host-infrastructure libs. Updates:

- manifest.module id: lib-sporel.launcher -> lib-management.launcher
- manifest.core id: lib-sporel.launcher.core -> lib-management.launcher.core
- init.lua engine.module.dir_of("lib-management.launcher")
- README + fsm.lua comment refs

Gitea repo renamed in lockstep:
sporel/sporel-module-lib-sporel.launcher ->
sporel/sporel-module-lib-management.launcher
2026-05-31 00:21:51 +02:00
Calic
3fe0d03583 feat(P.3.5): use engine.window.size() instead of hardcoded 1280x720 2026-05-13 02:15:34 +02:00
Calic
5dde5b28c9 fix(P.3.4): correct aabb_contains_point signature + SPOREL_CI self-exit
- hit() now passes rect-table as single arg (not destructured) per
  engine.spatial.aabb_contains_point(rect, px, py) signature.
- update() honors SPOREL_CI=1 via 60-frame self-exit (matches spine-
  prototype pattern). Required for headless smoke (P0-S15).
2026-05-12 23:38:38 +02:00
Calic
141683438d feat(P.3.4): initial — Sporel Launcher v0.1.0 (FSM + click-UI + quit-confirm) 2026-05-12 23:05:55 +02:00