Share the mirror screen's duplicated Tally types and presentation with App - #468
Merged
lamemustafa merged 1 commit intoSep 16, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…h App MirrorProofScreen.tsx was extracted from main.tsx by copying: 22 top-level items (about 230 lines) were byte-identical in both files, and three types (TallyCompany, TallySyncEvidence, MirrorExplorerPage) had already drifted, with the mirror screen holding narrower copies. Move each shared item once, verbatim, into a module named for its subject: - display-format.ts: formatIdentifier, formatRuntimeTime - tally-command-error.tsx: the command error envelope, OperatorError, TallyErrorNotice, and App's toOperatorError/toErrorMessage - tally-capability-evidence.tsx: capability evidence types, labels, CapabilityBadge and CapabilityRows - tally-mirror-contract.ts: the command DTO types both screens use, taking App's (fuller) version of the three drifted types Exports are limited to names another module imports. No behaviour change: every moved body matches master's main.tsx text, every item left in either screen is unchanged, and the only added lines are imports. tally-setup-safety's remediation test read "Next step:" out of main.tsx; it now reads the shared notice and asserts both screens import it rather than defining their own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lamemustafa
force-pushed
the
tapish-claude/share-tally-mirror-presentation
branch
from
September 16, 2026 23:33
87121db to
6735b38
Compare
lamemustafa
deleted the
tapish-claude/share-tally-mirror-presentation
branch
September 16, 2026 23:45
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.
Problem
src/MirrorProofScreen.tsxwas extracted fromsrc/main.tsxby copying, and the originals were never removed. Measured with the TypeScript AST on master32ac7d79, comparing top-level items by exact text:TallyErrorNotice,CapabilityRows,CapabilityBadge, the capability formatters and labels,formatIdentifier,formatRuntimeTime, and 13 DTO types.TallyCompany,TallySyncEvidenceandMirrorExplorerPageare narrower in the mirror screen. For example, itsTallySyncEvidence.operator_hint.stateisstringwhere App has a closed union.Both files are pinned, so every fix to one copy costs a reseal and still leaves the other copy stale.
This is the first step of the frontend large-file work. It is a pure move, sized to review as one. It follows the decision checklist in
docs/rust-module-conventions.md(#461) where the checklist applies to TS: delete or dedupe before decomposing, name modules by subject, keep the move free of edits, and prove it.Change
Each shared item moves once, verbatim, into a module named for its subject:
src/display-format.tsformatIdentifier,formatRuntimeTimesrc/tally-command-error.tsxOperatorError,TallyErrorNotice, and App'stoOperatorError/toErrorMessage/isTallyCommandErrorEnvelopesrc/tally-capability-evidence.tsxPACK_LABELS,CAPABILITY_REASON_LABELS, formatters,CapabilityBadge,CapabilityRowssrc/tally-mirror-contract.tsExports are limited to names another module actually imports. The rest stay module-private.
main.tsx: 2594 → 2290 lines.MirrorProofScreen.tsx: 967 → 694.Why it is a pure move (measured)
main.tsx's text for that item, apart from the addedexportkeyword (0 mismatches).main.tsxorMirrorProofScreen.tsxis unchanged (0 changed, 0 added). The only added lines are imports, and the removed lines are the moved items plus the now-unusedclassifyTallyErrorimport.tsc --noEmitpasses. Proved the check is live by injecting a type error, which it reported.corepack pnpm buildsucceeds.Pins
main.tsx,MirrorProofScreen.tsx,scripts/tally-setup-safety.test.mjsandtools/bridge-tally-compatibility/src/lib.rsare resealed (4 digests, pin list unchanged). Perdocs/module-decomposition.md("a pinned file's collaborators are pinned or explicitly exempted"), the exemption and its reason are recorded besideMAX_SURFACE_FILES. The four new modules are deliberately unpinned, by the seal criterion "could a silent change make a workbook or drawer attribute a report to the wrong book?":Reviewers, please challenge this.
tally-error-copy.tsis pinned, andTallyErrorNoticerenders its classification.Test change
tally-setup-safety.test.mjs› "structured Tally errors retain their backend remediation" readNext step: {message.remediation}out ofmain.tsx. It now reads it from the shared notice, and also asserts that both screens importTallyErrorNoticefrom./tally-command-errorand define no local copy, so the drift this PR removes cannot come back unseen. Mutation-checked:function TallyErrorNoticetomain.tsxfails the test;Next step:line from the notice fails it;Verification
Rebased onto
6b9c4e8b(251 pins after #444). Re-proven on that base: 28 moved items with 0 text mismatches, 0 changed and 0 added items in either screen. Seal checked without the tool binary: every pinned file's sha256 matches, the matrix points at the manifest, and the pin paths equal master's.tsc,cargo test -p bridge-tally-compatibility --lib24/24 and node 250/250 pass.Earlier, on the first head:
corepack pnpm testafter commit: node 244/244, vitest 113/113, Playwright 10/10.corepack pnpm buildOK.Not in this PR (found while measuring; for follow-ups)
errorMessage,operatorMessage,formatInvokeError), and they disagree on whether the backendremediationis shown. SourceDraft, Outstandings and NativeLifecycle drop it. Unifying them changes what operators see, so it needs its own PR and a decision.AxalScreenandDocumentsScreenduplicateAxalIntegration,AxalConnectionStatusandTABLE_PREVIEW_LIMITfrommain.tsx.JournalPostingScreenandGstScreenhold driftedTallyConfigandGstReturnDraft.🤖 Generated with Claude Code