Skip to content

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

Draft
akira69 wants to merge 3 commits intoDonkie:masterfrom
akira69:feat/complex-extra-fields-framework
Draft

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

Conversation

@akira69
Copy link
Copy Markdown

@akira69 akira69 commented Mar 7, 2026

Summary

Introduces the Applications Framework — infrastructure for optional, user-configurable applications that extend Spoolman without modifying core code.

Rebrands "Complex Fields" to "Applications" — a more user-familiar ecosystem paradigm. The framework is independent: it merges standalone with a demo registry, and future features build on top without modifying core Spoolman.

Development note: Active development is on the fork PR akira69/Spoolman_Labels#9. This upstream PR will be updated when ready for review.

Architecture

  • Registry pattern: register_application() at startup, runtime dict, DB persistence for enabled state
  • Per-entity control: Separate enabled/disabled toggles per Spool / Filament / Vendor surface
  • Independence: No other PRs required to merge; future features optionally register as applications

What Changed

Backend

  • spoolman/applications.py (NEW) — ApplicationDefinition, ApplicationSurface, registry, enable/disable logic
  • spoolman/demo_applications.py (NEW) — 8 concept stubs registered at startup (Drying Tracker, Inventory Alerts, Print History, Weight Audit, QR Customization, Spool Count, Filament Textures, Storage Conditions)
  • spoolman/api/v1/field.py (MODIFIED) — endpoints renamed to /field/application/{entity_type} (GET/POST)
  • spoolman/settings.py (MODIFIED) — setting keys updated to applications_* (was complex_fields_*)
  • spoolman/complex_fields.py (DELETED) — replaced by applications.py
  • migrations/versions/…_rename_complex_fields_to_applications.py (NEW) — Alembic upgrade/downgrade for setting key rename

Frontend

  • client/src/components/applicationCard.tsx (NEW) — Card with emoji avatar, per-surface enable toggles, Configure button
  • client/src/pages/applications/index.tsx (NEW) — Catalog page with Segmented filter (All/Enabled), responsive grid
  • client/src/pages/applications/detail/index.tsx (NEW) — Detail page with surface table and enable switches
  • client/src/utils/queryFields.ts (MODIFIED) — types/hooks/API paths renamed to Applications
  • client/src/App.tsx (MODIFIED) — Applications resource + /applications and /applications/:appKey routes added
  • client/src/pages/settings/index.tsx (MODIFIED) — Complex Fields menu removed
  • client/src/pages/settings/complexFieldsSettings.tsx (DELETED)
  • client/public/locales/en/common.json (MODIFIED) — i18n keys updated

Code Quality Compliance ✅

  • ESLint: 0 errors across all modified/new frontend files
  • Prettier: All files formatted
  • Ruff: Fixed FBT001 (boolean positional arg → keyword-only), E501 (long lines wrapped with implicit string concatenation)
  • Pre-commit: Full suite passed (ESLint, Prettier, Ruff, UV lockfile)

Next Steps

Test Checklist

  • Applications entry appears in sidebar navigation
  • /applications catalog page loads with 8 demo app cards
  • Each card shows emoji icon, name, description, and per-surface enable toggles
  • Toggling a surface enable/disable persists after page reload
  • Segmented filter (All / Enabled) correctly filters the grid
  • Clicking Configure navigates to /applications/:appKey detail page
  • Detail page shows table with all surfaces and enable switches
  • Back button returns to catalog from detail page
  • Settings page no longer shows Complex Fields section
  • API: GET /api/v1/field/application/spool returns demo apps

@akira69 akira69 marked this pull request as draft March 7, 2026 04:42
@akira69 akira69 changed the title feat(settings): add complex fields framework feat(settings): Applications Framework for Optional Extensible Features Mar 17, 2026
akira69 added 2 commits March 19, 2026 08:44
…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)
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