Uh oh!
There was an error while loading. Please reload this page.
refactor(renderer): shared useMountedRef + last formatBytes fork (Round D-1) - #871
Merged
Conversation
… removed (Round D-1) The mounted-guard pattern (ref set true on mount, false on unmount, read before every post-await setState/toast) was hand-rolled per component. One hook in @maka/ui now owns the flag; components keep separate cleanup effects only for their own companion refs. Contracts re-pinned to the shared-hook form (first-run, settings-form-a11y, general-settings, daily-review, roadmap-cleanup). voice-settings-page's formatVoiceBytes was the last local fork of formatBytes — replaced with the @maka/ui helper (round-21 dedup rationale). Map updated with the real ×38 census; long tail staged as Round D-2.
Uh oh!
There was an error while loading. Please reload this page.
Astro-Han added a commit
that referenced
this pull request
Jul 16, 2026
* docs: retire tracked notes into the archive notes/ regrew tracked files after the archive README retired it as an undocumented parallel authority. Move the simplification baseline map (#871-#887) and the shipped composer-mentions v1 spec (#979) into docs/archive/, register them under Former repository notes, and point the citing source comments at the archived path. * docs: archive computer-use chronicles and research records The #857-#985 computer-use chain left one root document per PR: follow-up fix records, an incident investigation, and run logs that duplicate the kept contracts. Archive the seven chronicles, mark the foundation contract validation matrix as the #857 split-gate baseline (current state lives in source and contract tests), and register each archived file in the archive README with a pointer to its current authority. Also archive the WorkBuddy/QoderWork reverse-engineering records (the shipped design contract stays at docs/expert-team-runtime.md) and the synthesis-cache benchmark log (progress belongs in issues #481/#578), and fix the two surviving links to the moved paths. * docs: map current contracts in the documentation README Seventeen root documents existed outside the authority map with zero incoming links. After archiving the chronicles, list the surviving computer-use contracts and the expert-teams runtime contract, and write down the maintenance rule that PR follow-up records, incident investigations, and run logs belong in pull requests or the archive — with notes/ and docs/local/ as untracked local scratch.
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 freeto 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.
Round D-1 of notes/frontend-simplification-map-2026-07-13.md.
useMountedRef
The mounted-guard boilerplate (ref true on mount / false on unmount / checked before every post-await setState) was hand-rolled per component. Re-census (case-insensitive) puts it at ×38 sites, not the ×6 the map originally estimated. This round ships the primitive in @maka/ui and converts the 6 canonical sites (OnboardingHero ×2, password-input, daily-review / general / permission-center settings pages); components keep separate cleanup effects for their own companion refs only. 5 contracts re-pinned to the shared-hook form — read-side pins (
mountedRef.currentguards) survive untouched because the hook returns the same-named ref.Deliberately not converted: use-workspace-instructions-controller (lifecycle-counter variant — not boilerplate) and app-shell.tsx (Round B agent owns that file). The ~30-site long tail is staged as Round D-2 in the map.
formatBytes
voice-settings-page's formatVoiceBytes was the last local fork (round-21 dedup killed the others) — replaced with the shared @maka/ui helper. Byte copy in the voice smoke toast gains one decimal of KB precision, matching every other surface.
Gates
desktop 2397/2397 · ui 125/125 · typecheck · knip ×2 = 0 · check-dead-css clean.