Skip to content

Linux Hub skeleton, substratalctl, and the versioned help center - #1

Open
Adron wants to merge 4 commits into
mainfrom
feature/skeleton-and-help-center
Open

Adron wants to merge 4 commits into
mainfrom
feature/skeleton-and-help-center

Conversation

@Adron

@Adron Adron commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

What this adds

Prerequisites: checked and recorded in planning/PREREQUISITES.md, including the API versioning change. The version is the Substratal-Version: 1 header, URLs have no /v1, and /v1/... returns 404. This was verified against production.

App skeleton: GTK 4 + libadwaita, Rust.

  • substratal-core is GTK-free:
    • an API client that sets the version header in one place
    • single-flight token refresh, idempotency keys, If-Match, and retries
    • error decoding, and Deprecation/Sunset handling that drives "Update available" and "Update required"
    • Secret Service storage, Capabilities, navigation rules and shortcuts
    • a screen registry generated from the specs (75 Hub screens, plus 12 web-only Console screens)
  • substratal-hub:
    • shell with a sidebar gated by Capabilities, a router and substratal:// deep links
    • Blueprint sign-in with 2FA
    • 10 themes, a command palette, a shortcuts dialog, and F1 help for each screen
    • spec-driven scaffolds for every screen, plus live Users, Account and Appearance screens
  • substratalctl is a CLI on the same core.

Help: moved to the Hub help center in the specs repo, the one documentation site for every Hub app (CompositeCode/substratalapps-applications-specs#3). The Linux guide, the Linux keyboard shortcuts and the substratalctl reference are there; the last two are generated from this code by cargo xtask gen-help. The app's F1 and Help buttons open …/substratalapps-applications-specs/help/screens/<id>.html. This repo no longer builds its own site.

Automation:

  • CI (ci.yml): fmt, clippy with -D warnings, tests, checks that spec-derived files and the Linux help pages are current, and desktop/AppStream validation.
  • Docs dispatch (docs-dispatch.yml): on every merge to main, regenerates the Linux help pages, opens a PR in the specs repo, and sends app-docs-updated so the help center rebuilds. Needs the SPECS_DOCS_TOKEN secret.
  • API spec sync (api-spec-sync.yml): runs every 6 hours or on demand. It updates vendor/openapi.yaml and opens a PR with the oasdiff changelog, labelled when there's a breaking change.
  • Specs sync (specs-sync.yml): runs daily.
  • Flatpak (flatpak.yml): builds the bundle on GNOME 50.

Verified locally (Ubuntu 24.04 container: GTK 4.14.5, libadwaita 1.5.0)

  • cargo fmt --check, cargo clippy -D warnings, and cargo test: 34 tests pass. 7 of them drive the HTTP client against a stub server to check the version header, deprecation handling, update-required, refresh on 401, idempotency and If-Match.
  • The app renders under Xvfb in light and dark mode, in preview and sign-in modes.
  • substratalctl against production: health returns ok, and errors carry their request ID.
  • The specs help center builds in strict mode with the Linux pages (0 problems).

Not covered yet

  • No signed-in run against live data, because there's no test account yet. The tests use a stub server.
  • The Flatpak workflow hasn't run yet.
  • The generated typed API client is still a spike. The hand-written models cover the calls the skeleton makes.

🤖 Generated with Claude Code

Adron and others added 4 commits October 23, 2026 09:19
App (GTK 4 + libadwaita, Rust):
- substratal-core: API client that sends Substratal-Version: 1 to the
  host root (no /v1), with single-flight refresh, idempotency keys,
  If-Match, retries, error-envelope decoding, and Deprecation/Sunset ->
  "Update available"/"Update required"; Secret Service storage;
  Capabilities; the screen registry (all 75 Hub screens plus the 12
  web-only Console screens) generated from the specs; navigation and
  visibility rules; shortcuts.
- substratal-hub: window shell with gated sidebar, router and
  substratal:// links, Blueprint sign-in with 2FA, themes (5 light,
  5 dark), command palette, shortcuts dialog, F1 help per screen,
  spec-driven scaffolds for every screen, and live Users, Account and
  Settings > Appearance screens.
- substratalctl: CLI on the same core.

Help center (docs/, Jekyll + just-the-docs) for every Hub app: guides,
tutorials, FAQ, a page per screen, API versioning and auth, Swagger UI
with a Substratal-Version picker, every API operation cross-linked to
the screens using it, and versioned snapshots like the API docs.
Reference pages are generated from the code by `cargo xtask gen-docs`.

Automation: CI (fmt, clippy, tests, generated-docs and spec checks),
docs build + GitHub Pages deploy on every change to main, API spec sync
(oasdiff changelog, PR) and client specs sync, Flatpak builds.

Plans moved to planning/, with a prerequisites check and dated updates
for header versioning and the web-only Console (specs OPEN-QUESTIONS #27).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Flatpak SDK's cargo rejects overriding default-features of a
workspace dependency, so the workspace now declares substratal-core
without default features and the app and CLI enable keyring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Hub help center (help/ in CompositeCode/substratalapps-applications-specs)
is the one documentation site for every Hub app, so this repo no longer
builds its own:

- Remove docs/, scripts/docs-build.rb and the Pages deploy workflow.
- Help links (F1, Help buttons, About, AppStream) open
  .../substratalapps-applications-specs/help/, screens at
  help/screens/<id>.html.
- xtask gen-docs becomes gen-help: it writes the Linux pages that come
  from this code (keyboard shortcuts, substratalctl) into the specs
  repo's help/. The Linux guide and these pages are in
  substratalapps-applications-specs PR #3.
- New docs-dispatch workflow: on push to main, regenerate those pages,
  open a PR in the specs repo and send app-docs-updated
  (needs SPECS_DOCS_TOKEN).
- API spec sync now only updates vendor/openapi.yaml (with the oasdiff
  changelog in the PR); the help center builds its API reference from
  the live spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant