refactor(ui): extract shell copy resources - #4001
Closed
orangeCatDeveloper wants to merge 2 commits into
Closed
Conversation
Shared UI copy should use the same typed, domain-owned resource contract without duplicating catalog validation across packages.
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.
Part of #2672
Adding a shared UI locale still requires editing TypeScript presentation catalogs even when the visible copy and behavior do not change.
UiCatalog<T>guarantees locale coverage, but its exact resource-shape and named-placeholder checks were private to the CLI migration. Shared UI copy therefore remained coupled to executable formatter functions and had no package-level resource inventory.This change promotes the reusable catalog definition and named-placeholder formatter to
@maka/core, with the CLI retaining its existing aliases.packages/uigains its own statically imported resource registry, and theshell-controlsdomain moves to locale-owned JSON while materializing the same public function API, including English singular/plural behavior. Tests discover every locale directory and verify registry coverage, nested shape, placeholders, compiled-resource presence, and rendered copy.This is one domain-owned migration slice: it does not add a locale or change visible copy, layout, machine-readable output, or protocol behavior. Follow-up PRs will migrate the remaining domains incrementally.
Depends on #3990; this branch is based on that change and will be rebased after it lands.
Evidence
The before and after captures use the real Electron
projectSidebarWindowfixture with the same Chinese locale and open search surface. The affected modal is byte-identical across the migration.Verification
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex implemented and tested the refactor, reviewed the final diff, and prepared this PR description.
Checklist
Does this PR entail a change in behavior?