feat(settings): Create Extra Fields by Formula via built-in JSON editor#885
Draft
akira69 wants to merge 3 commits intoDonkie:masterfrom
Draft
feat(settings): Create Extra Fields by Formula via built-in JSON editor#885akira69 wants to merge 3 commits intoDonkie:masterfrom
akira69 wants to merge 3 commits intoDonkie:masterfrom
Conversation
…tips, remove clutter, add guidance icons
This was referenced Mar 16, 2026
This was referenced Mar 17, 2026
Draft
5 tasks
Author
|
Putting this PR back into draft while I rework the formula-field authoring UI in my fork first. Current issue: the flat field-reference picker gets too cluttered once related Follow-up work is moving to akira69#13 so I can iterate on a grouped/searchable/collapsible reference-picker approach before deciding what should come back here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Formula Extra Fields as a reviewer-facing Settings workflow for authoring derived values from JSON Logic without storing duplicated source data.
betterbugs_recording.webm
What Changed
Formula Extra Fieldssection in Extra Fields settings with JSON Logic editing, token insertion, sample-value preview, and save/edit/delete flows.Show,List,Template) and API exposure split by field-levelinclude_in_api, returned underderived.*.Referenced In.filament.color_hex.Screenshots
Create/edit formula field flow
Formula Extra Fieldssection underExtra FieldsSettingsEditor + Help UX
Template/List/API Integration examples
{derived.your_key}derivedpayloadTesting Performed
ppr 885uv run ruff check spoolman/derived_fields.py spoolman/extra_fields.py spoolman/api/v1/field.py spoolman/api/v1/spool.py spoolman/api/v1/filament.py spoolman/api/v1/vendor.py spoolman/formula_references.py tests_integration/tests/fields/test_derived.py tests_integration/tests/fields/test_derived_api.pycd client && ./node_modules/.bin/eslint src/pages/settings/extraFieldsSettings.tsx src/pages/settings/formulaFieldsSettings.tsx src/utils/formulaFields.ts src/utils/queryFields.tscd client && VITE_APIURL=/api/v1 npm run buildPATH=.venv/bin:$PATH python - <<'PY'direct API validation againsthttp://localhost:9885/api/v1include_in_apiis independent from UI surfaces and returned underderived.*$HOME/.codex/skills/playwright/scripts/playwright_cli.sh open http://localhost:9885/settings/extra/spool --headed$HOME/.codex/skills/playwright/scripts/playwright_cli.sh snapshot$HOME/.codex/skills/playwright/scripts/playwright_cli.sh click ... / fill ... / eval ... / run-code "$CODE"focused browser validation againsthttp://localhost:9885usage_deltafrom Settings, used operator/reference token insertion, previewed200, saved it, and reopened it for editingregistered_datefrom Settings, used helper/reference insertion, previewed2026-03-01, and saved itfilament.color_hexReferenced Inupdates to1 formula fieldand referenced custom-field delete is disabled in Settingsrgb(255, 255, 255)) and dark (rgb(20, 20, 20)) themesUsage Delta = 200,Color Hue = 120,Finish Label = Finish: matte, and existing custom fields still renderHide Columnstoggles theUsage Deltalist column both directions (0 -> 1,1 -> 0, restored to visible)Color HueTest Checklist
Formula Extra FieldssectionHide Columnsderived.*output respects field-levelinclude_in_apiindependently of UI surfacesRemaining Manual Check
/spool/printwas only partially exercised. The selection flow was reached, but I did not complete a stable browser assertion against the final template text editor itself in this pass.