Skip to content

feat(settings): Applications Framework for Optional Extensible Features#9

Draft
akira69 wants to merge 3 commits intobase/upstream-masterfrom
feat/complex-extra-fields-framework
Draft

feat(settings): Applications Framework for Optional Extensible Features#9
akira69 wants to merge 3 commits intobase/upstream-masterfrom
feat/complex-extra-fields-framework

Conversation

@akira69
Copy link
Copy Markdown
Owner

@akira69 akira69 commented Mar 19, 2026

Summary

Introduces the Applications Framework as the foundation for optional, user-configurable extensions in Spoolman.

This PR still represents the framework base:

  • code-registered applications
  • applications catalog and detail pages
  • persistence for enabled state
  • per-entity native surface enablement

Since opening this PR, the work has expanded into a fuller successor implementation on:

  • feat/hosted-applications-framework-workspace in akira69/Spoolman_Labels

That successor branch keeps PR #9 as the conceptual and structural foundation, but now proves the framework with real applications and a real runtime surface.

Development note: PR #9 is still best read as the framework base. The currently implemented runtime work is on feat/hosted-applications-framework-workspace, with the hosted swatch adapter on feat/spoolman-hosted-mode in the separate spoolman-filament-swatch repo.

What PR #9 Establishes

Backend

  • spoolman/applications.py adds the application registry and catalog model
  • applications can be registered at startup and grouped under a user-facing catalog
  • per-entity native application enablement is stored in settings

Frontend

  • /applications catalog page
  • /applications/:appKey detail page
  • enable/disable controls for registered applications
  • sidebar Applications entry

Current Successor Scope

The active successor branch extends this foundation with:

  • native_surface, hosted_web_app, and external_link application kinds
  • catalog-level availability and enablement for hosted and external apps
  • same-origin application runtime route: /applications/:appKey/run
  • same-origin hosted bundle mounting under /app-host/<appKey>/
  • launch metadata and runtime handling for hosted and native-runtime apps
  • richer catalog metadata including developer links, source repository links, preview imagery, and screenshots

Current Proven Applications

The successor branch currently proves the model with two real apps:

1. Filament Swatch

  • modeled as a hosted_web_app
  • launches inside the Spoolman shell as a same-origin embedded app
  • follows parent dark/light theme state
  • uses host-provided Spoolman config and base-path context

2. Filament Calibration Profiles

  • modeled as a native_surface app with a dedicated native runtime
  • adds calibration summary surfaces to filament and spool detail pages
  • adds a calibration workspace launched from filament edit
  • includes:
    • session history
    • guided calibration wizard
    • recommended-value summaries
    • “Start from Existing Calibration” seeding flow

Current Hosted / Native Runtime Status

Verified locally on March 26, 2026 against a temp instance on http://127.0.0.1:9878:

  • Applications catalog and detail pages load
  • Filament Swatch launches in the Spoolman shell
  • hosted app data loads from seeded temp Spoolman data
  • hosted app follows parent dark/light mode
  • Filament Calibration Profiles renders as a native app in the catalog
  • calibration detail page now includes:
    • developer attribution (SmoothBrainIT)
    • source repo attribution (Orca-Slicer-Assistant by ItsDeidara)
    • preview/runtime screenshot
    • wizard screenshot
  • filament detail page shows calibration summary
  • spool detail page mirrors filament calibration summary read-only
  • filament edit page exposes the calibration workspace entry point
  • calibration runtime supports resuming the wizard and seeding from an existing filament calibration

Separate Swatch Adapter Work

The swatch adaptation is intentionally kept out of the Spoolman repo.

Current adapter branch:

  • repo: spoolman-filament-swatch
  • branch: feat/spoolman-hosted-mode

That branch currently contains hosted-mode support for:

  • host-provided Spoolman base URL
  • hosted routing defaults
  • hosted theme following
  • hosted title/branding cleanup
  • standalone theme selector removal in hosted mode
  • bundle output suitable for same-origin mounting inside Spoolman

Why This PR Body Was Updated

The original PR text framed Applications Framework mostly as a rename/reframe of earlier complex-fields work. That is no longer the whole story.

The current architecture direction is:

  1. PR feat(settings): Applications Framework for Optional Extensible Features #9 remains the framework base.
  2. The successor branch turns that base into a real application runtime.
  3. Filament Swatch proves the hosted-app path.
  4. Filament Calibration Profiles proves the native-runtime path.

Known Remaining Follow-Up

  • split and stage the hosted-shell successor work into reviewable upstream PR structure
  • decide whether hosted runtime lands as an update to PR feat(settings): Applications Framework for Optional Extensible Features #9 or as successor PRs
  • clean up the nested-route service worker 404 still visible in browser console for some hosted routes
  • open or restack the swatch hosted-mode adapter PR as needed

Test Checklist

  • Applications entry appears in sidebar navigation
  • /applications catalog page loads
  • /applications/:appKey detail page loads
  • Framework supports catalog-driven application metadata
  • Framework successor branch supports hosted application runtime
  • Framework successor branch supports native runtime applications
  • Filament Swatch launches from within the Spoolman shell
  • Hosted app data loads from a seeded temp Spoolman instance
  • Hosted app follows parent dark/light mode
  • Filament Calibration Profiles launches from within the Spoolman shell
  • Calibration summary appears on filament detail pages
  • Calibration summary appears on spool detail pages
  • Calibration workspace launches from filament edit
  • Calibration chooser can seed a new session from an existing filament calibration
  • Nested-route service worker behavior cleaned up
  • Swatch adapter PR finalized separately

akira69 added 2 commits March 6, 2026 21:40
…og UI

- Rename spoolman/complex_fields.py to spoolman/applications.py
  All ComplexField* classes renamed to Application*
  Added icon and app_key fields to ApplicationDefinition
- Add spoolman/demo_applications.py with 8 concept app stubs:
  Drying Tracker, Inventory Alerts, Print History, Weight Audit,
  QR Customization, Spool Count, Filament Textures, Storage Conditions
- Wire register_demo_applications() into startup in main.py
- Rename API endpoints: /field/complex/ to /field/application/
- Rename setting keys: complex_fields_* to applications_*
- Add Alembic migration to rename existing setting rows in DB
- Frontend: rename ComplexField* types/hooks to Application* in queryFields.ts
- Frontend: remove Complex Fields from Settings page (menu + route)
- Frontend: add Applications to sidebar navigation (AppstoreOutlined icon)
- Frontend: new ApplicationCard compone- Frontend: new ApplicationCard compone- Frontend: new ApplicationCard compone- Frontend: new ApplicationCard compone- Frontend: new ApplicationCa en- Frontend: new ApplicationCard compone- Frontend: new Applicas to applications keys
…emo apps

- Move 'applications' i18n keys from settings.applications to top-level
- Add status.active/partial/inactive keys for badge text
- Add display:flex to Col and Card for uniform card heights
- Remove spool_count (already exists as a feature in separate PR)
- Remove filament_textures (better implemented as a common extra field)
- Add Filament Calibration Profiles app (flow rate, PA, temp tower per filament)
- Add Bambu AMS Sync app (auto-sync spool data with AMS unit)
@akira69
Copy link
Copy Markdown
Owner Author

akira69 commented Mar 24, 2026

Current implementation status as of 2026-03-23:

  • PR feat(settings): Applications Framework for Optional Extensible Features #9 remains the catalog and enablement foundation.
  • Active hosted-shell work is being implemented on feat/hosted-applications-framework-workspace.
  • The first hosted app is Filament Swatch, mounted same-origin inside the Spoolman shell.
  • The swatch adapter work is being kept in its own repo on feat/spoolman-hosted-mode; there is not yet a separate PR for that branch.

What is working locally right now:

  • Applications has a nested Filament Swatch entry in the sidebar
  • /applications/filament_swatch/run keeps the Spoolman left shell and fills the main pane with the hosted app
  • hosted mode follows the parent Spoolman dark/light theme
  • hosted mode removes the app-local theme selector
  • a seeded temp database is rendering live filament/spool data inside the embedded app

Known remaining follow-up:

  • nested-route service worker 404 still appears in the browser console
  • the hosted-shell implementation still needs to be split into the final review structure
  • the swatch adapter branch still needs its own PR when ready

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