feat(framework): persist dashboard preferences in the-framework.json (#410)#447
Merged
Conversation
…410) The dashboard's Global options (Autopilot, Technical, Vanilla, Eco + its section drops) now persist daemon-side in the same the-framework.json as the project list, read and written over Telefunc (onPreferences / savePreferences). No more localStorage, and the toggles survive a restart. The registry file becomes an object { projects, preferences }; older bare-array files still read and migrate on the next write. The preferences store is threaded through the Telefunc request context, so the public relay (which never wires one) leaves reads at the empty default and writes reported as not enabled. Closes #410
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.
Closes #410.
The dashboard's Global options (Autopilot, Technical, Vanilla, Eco) now persist in the same
the-framework.jsonas the project list, so they survive a restart. localStorage is gone: the daemon owns the file, the SPA reads/writes it over Telefunc (onPreferences/savePreferences).The registry file becomes
{ projects, preferences }. Old bare-array files still read and migrate on the next write, so nothing breaks for existing installs.Preferences are gated the same way project writes are: the daemon wires the real registry file into the Telefunc context; the public relay never does, so on a shared host a read returns the empty default and a write reports it is not enabled.
Verified on a real daemon: a legacy-array file reads as
{}, a save persists and migrates the file to object form (keeping the project list, dropping any junk field), a re-read reflects it, and a cross-origin write is 403. Framework tests + typecheck + dashboard build all green. Browser render of the toggles is unverified here (no browser in the env) so I left a daemon up on :4200 to eyeball.