Skip to content

feat(projects): sync actions from styal.json - #307

Draft
incognitojam wants to merge 5 commits into
mainfrom
styal/migrate-t3-config-to-styal
Draft

incognitojam wants to merge 5 commits into
mainfrom
styal/migrate-t3-config-to-styal

Conversation

@incognitojam

@incognitojam incognitojam commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Note

Uses the active checkout's styal.json when present, keeps Styal's local project actions working when it is absent, and makes moving either local or legacy t3.json actions into a checkout an explicit one-click operation.

Project actions currently have to be imported from t3.json, creating a database copy that drifts from the repository and cannot reflect different configuration in the main checkout and a worktree. At the same time, requiring every project to commit a Styal-specific file would remove the existing local-only workflow.

This adds the Styal-owned styal.json schema and gives each checkout one unambiguous runnable action source:

  • If the exact checkout contains a valid styal.json, actions are read directly from that file. Adding, editing, or deleting an action on web or desktop updates that checkout's file while preserving JSONC comments and unrelated settings.
  • If the checkout has no styal.json, the project's existing database-backed actions remain runnable and editable. Those actions continue to support the explicitly configured worktree setup action.
  • t3.json actions are migration inputs only. They are never silently executed or mixed into the runnable list.
  • An invalid, unreadable, loading, or oversized styal.json does not fall back to another action source or allow an overwrite.

Create styal.json copies local actions and supported t3.json settings/actions into the checkout where it is invoked, generates stable IDs, preserves saved IDs used by keybindings, and leaves the legacy sources untouched. When a checkout already has styal.json, local actions remain stored in Styal and can be copied into that file explicitly; they are not merged into its runnable actions. This avoids copying an uncommitted file between worktrees while still supporting users who cannot or do not want to commit one.

Checked-in actions are always manual. The public styal.json schema no longer exposes a setup flag, so it cannot imply that repository-controlled commands are enabled. Local setup actions retain their existing automatic behavior because configuring them in Styal is the consent boundary. Mobile follows the same file-first/local-fallback rule.

Project and terminal processes continue to receive canonical STYAL_* variables and one-way T3CODE_* compatibility aliases.

Verification:

  • 84 focused tests across schema parsing, source precedence, mutation, migration, setup execution, missing-file handling, mobile fallback, and UI helpers
  • Typechecks for contracts, shared, server, web, mobile, and marketing
  • Targeted lint across changed TypeScript files
  • Marketing production build, including /schema/styal.json and /schema/t3.json
  • Integrated browser pass in the running desktop development environment with synthetic repositories, covering local-only actions, explicit migration, generated file contents, and distinct main-checkout/worktree files

Screenshots

Local actions remain usable without styal.json

The local setup action remains runnable, while Create styal.json is an explicit transition rather than a prerequisite.

Local actions remain runnable without styal.json

Setup remains an explicit local setting

Only a locally configured action offers Run after creating a worktree. Checked-in file actions have no setup control or automatic execution path.

Local action editor explaining the setup consent boundary

Worktrees use their exact checkout file

The worktree shows only its four styal.json actions—including Worktree Only and Worktree Added, but not the main checkout's Main Only. Its two local actions are offered as an explicit copy and are not mixed into the runnable list.

Worktree actions and explicit local-action copy


Written by an agent (styal, GPT-5.6-sol).

@incognitojam
incognitojam force-pushed the styal/migrate-t3-config-to-styal branch 2 times, most recently from 42db2ef to 130ed59 Compare September 4, 2026 14:36
@incognitojam
incognitojam marked this pull request as ready for review September 4, 2026 14:59
@incognitojam
incognitojam marked this pull request as draft September 4, 2026 15:27
@incognitojam
incognitojam force-pushed the styal/migrate-t3-config-to-styal branch from 130ed59 to c62e58c Compare September 4, 2026 16:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant