Commit Graph

22 Commits

Author SHA1 Message Date
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
72fa4d3135 fix(launcher): right-align dep-status glyph in fixed gutter
ASCII fallback glyphs ('OK', 'WARN', 'ERR') have variable width; the
previous 40px column gap was too narrow for 'WARN', causing the id
column to wobble between modules. Widens the gutter to 48px and
right-aligns the glyph inside it so the id text always starts at a
predictable x.
2026-06-11 02:15:47 +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
b360ee6230 refactor(launcher): memoize markdown.lua in manifest_loader ensure_deps
Matches the existing frontmatter.lua memoization pattern. Avoids
re-dofile'ing markdown.lua per successful load_for call (matters
once L.9 rolls out manifest.launcher.md to every module and the
init-time call count goes from 1 to N).
2026-06-11 02:03:19 +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
41b28ff37d feat(launcher): add list + detail panel stubs (master-detail L.2)
Splits rendering into panels/list.lua and panels/detail.lua. List
implements row hit-test, scroll-state, whole-list bg-tint hook for the
dep-conflict UX (L-Q6). Detail renders an empty-state placeholder
until L.4-L.7 fill in title, description, deps, carousel, and launch
button.
2026-06-11 01:41:11 +02:00
Calic
1658aebe70 fix(launcher): strip trailing LF from frontmatter body
The body region rebuilt from line-split included a trailing empty
entry from the final LF the parser appends to drive its gmatch. Strip
it so 'body text\n' (the on-disk content) parses to 'body text' (the
user-visible body), which is what the launcher-test asserts.
2026-06-11 01:26:50 +02:00
Calic
9d758e28c9 feat(launcher): add markdown.lua M3-subset renderer
Hand-rolled parser + renderer for the launcher's description bodies.
Supports headers H1-H3, paragraphs, bullet + ordered lists, inline
bold/italic/code, inline images. No tables, blockquotes, links, or
code blocks. Font sizes per spec L-Q3 (H1=24, H2=20, H3=16, body=14).
Images resolve via engine.module.load_texture when a module_id is
provided to the renderer.
2026-06-11 01:22:10 +02:00
Calic
942e05ba3e feat(launcher): add frontmatter.lua JSON-frontmatter parser
Parses manifest.launcher.md leading JSON-frontmatter (delimited by
standalone '---' lines), returns (meta, body). Reuses
lib-management.dep-fetcher._json_decode so we do not add a second JSON
decoder to the codebase. Lazy require so test-lib contexts can swap a
stub decoder via _G.LAUNCHER_FRONTMATTER_DECODER.
2026-06-11 01:21:27 +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.
v0.2.0
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
03027b077a docs: add standard module documentation
Initial README following the project's module documentation structure:
Abstract paragraph, Badges as bold key:value list, Topology section
with auto-generated mermaid graph, Controls describing player input,
Demonstrates listing the Sporel features showcased, References at
the end.

Install pre-commit hook via Sporel --install-hooks=.; topology is
auto-managed by Sporel --lint --fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 01:39:53 +02:00
Calic
c7cca569de deps(launcher): manifest.module.ci_frames=10 (Test-Opt Phase 4.1) 2026-05-16 01:28:49 +02:00
Calic
decf7b359a deps: bump lib-core.input dep 0.3.0 → 0.4.0 (P.3.10 cascade)
No behavioral change. Only 0.4.0 is now available.
2026-05-15 22:14:24 +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
4db760bc60 fix(P.3.4): manifest schema — add api, entry_point; exact-match dep version 2026-05-12 23:14: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