feat(framework): project-scoped custom presets, shared via the repo (#1025)#1044
Merged
Conversation
…1025) Custom presets were user-global only (#626): saved to the home config, private, following you across every project. This adds a project tier so a preset can be committed into the repo's .the-framework/custom-presets.json and shared with everyone who clones it. - New project-presets store (readProjectPresets/writeProjectPresets): a committed JSON file reusing the CustomPreset shape and sanitizer, plus a self-healing .the-framework/.gitignore negation so git tracks it. - Two telefuncs (onProjectPresets/saveProjectPresets) resolving the project's own checkout, gated like the other preference RPCs so a public relay host reads nothing and writes nothing. - Dashboard: a "Save to" scope choice on the create panel (Just me / This project), a "Project presets" group in the Presets menu and the / editor menu, each deletable. Closes #1025
suleimansh
marked this pull request as ready for review
July 22, 2026 19:18
…sets # Conflicts: # packages/framework-dashboard/components/Composer.tsx
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 #1025.
What
Custom presets were user-global only (#626): saved to your home config, private, following you everywhere. This adds the project tier the issue asks for, so a preset can be committed into the repo and shared with your team.
When you create a preset with a project open, a "Save to" choice appears:
.the-framework/custom-presets.json, so anyone who clones the repo gets it.Shared presets show under a "Project presets" group in the Presets menu and the
/editor menu, and delete from there. No project open = no scope choice (nothing to share into).How
project-presets.ts-readProjectPresets/writeProjectPresetsover a committed JSON file, reusing theCustomPresetshape +sanitizeCustomPresets(now exported). Write self-heals.the-framework/.gitignorewith a!custom-presets.jsonnegation, since that dir ignores everything butLOGS.mdby default.onProjectPresets/saveProjectPresets, folded intopreferences.telefunc.ts(so they auto-register and the Per-project preferences never reach the daemon: the two telefunctions are not registered #866 register test auto-covers them). They resolve the project's own checkout viaresolveProjectPathand are gated oncontextPreferences()like the other preference RPCs, so a public relay host reads nothing and writes nothing.lib/preferences.ts: a per-project presets cache,useProjectPresets(), andsaveProjectPresetList(), mirroring the existing project-preferences tier.PresetCreatePanel, a "Project presets" group inPresetsMenu(sharedSavedPresetRowextracted to avoid duplicating the user group),project-preset:items in the/menu.Notes for review
git add, like any source file. I did not add a dedicated commit step. Say the word if you want the write to commit itself..the-framework/). Open tothe-framework.ymlinstead if you'd rather it sit with the other committed run config.Tests
project-presets.test.ts: missing/malformed reads, round-trip, sanitize, gitignore negation idempotence). Register auto-check confirms both telefuncs registered.PresetsMenu.test.tsx+PresetCreatePanel.test.tsx).