Repository navigation
refactor: fold duplicate keyboard predicates, coverage rule, page size, and quote indexes from this week's merges - #5164
Merged
Merged
Conversation
The meeting-type field kept its own `hasModifier` copy of `hasAnyModifier` and its own Enter predicate, the exact drift the shared helper's doc comment warns about. It also spelled the `data-settings-shortcut` selector and the label-input id prefix as literals beside the helpers that build them, and rendered the row keycaps twice so the two copies could diverge. Reuse `hasAnyModifier`/`isPlainEnterKey`, add a `settingsShortcutSelector` next to `settingsShortcutAttrs` so the stamp and the query cannot drift, derive both the add-type selector and the id prefix from those helpers, and render one row-keycap fragment with the "On row:" lead-in conditional. No behavior change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmwVQFhTkQ5Zy37ZJk47Vj
Three history-coverage fixes landed in calendar repair this week and left the certification rule spelled twice: once as the pre-activation revoke condition and once as the final `complete` argument. Hoist a single `certified` boolean and use it for both, so the rule has one place to read and one place to change. `historyCoverageVersion` is `complete && skipped === 0`, so the stored result is identical. The reflection page reads repeated the literal 25 in the query limit, the merge slice, and the next-cursor test, where a partial edit would silently stop paging. Name it `PAGE_SIZE`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmwVQFhTkQ5Zy37ZJk47Vj
The weekly review picked its three quotes as `LIFE_QUOTES[2]`, `[13]` and `[23]`, so inserting or reordering a quote in the Life catalog would silently change what the email sends, and the existing test only asserted the quote came from the catalog at all. Name the three in `life-quotes.ts`, export them as `REFLECTION_EMAIL_QUOTES`, build the catalog from the same constants, and tighten the test to that list plus a check that the catalog still contains them. Same three quotes. Also fold two `lines: [...(cond ? [a] : [b])]` spreads into the conditional arrays they copy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmwVQFhTkQ5Zy37ZJk47Vj
Contributor
|
Boot bundle: 572.5 KB gzip (+0.0 KB vs main) |
Contributor
Author
|
Verify evidence, as promised in the description.
The verdict does not survive scrutiny and CI agrees:
CI on this head is green across the board: Generated by Claude Code |
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.
What and why
Technical-debt sweep over the merges from the last 7 days. Three independent cleanups, one commit each, no behavior change in any of them.
refactor(web): reuse shared keyboard predicates in meeting types (#5160, #5112, #5078 touched this file).BookingMeetingTypesFieldcarried its ownhasModifiercopy ofhasAnyModifierplus its own Enter predicate, which is the exact driftkeyboard-modifiers.util.tsdocuments itself against ("easy to copy with one modifier missing"). It also spelled[data-settings-shortcut="add-meeting-type"]twice andbooking-meeting-type-label-once as literals, beside the helpers that build both, and rendered the row keycaps twice so the two copies could diverge. Now it reuseshasAnyModifier/isPlainEnterKey(keeping the IMEisComposingguard), a newsettingsShortcutSelectorsits next tosettingsShortcutAttrsso the stamp and the query cannot drift (clickSettingsShortcutuses it too), the id prefix is shared withlabelInputId, and one keycap fragment renders with a conditional "On row:" lead-in.refactor(sync): one certification predicate and a named page size (#5150, #5152, #5140, #5143, #5145). Successive history-coverage fixes leftrepairCalendarstating the certification rule twice: once as the pre-activation revoke condition (!cursor || skipped > 0 || supportsFullHistory !== true) and once as the finalcompleteargument. A singlecertifiedboolean now drives both.recordHistoryCoveragestoreshistoryCoverageVersion = complete && skipped === 0, and the final call is only reached with a truthy cursor, so the stored row is byte-identical. Separately,readReflectionPagerepeated the literal25in the query limit, the merge slice, and the next-cursor test, where a partial edit would silently stop paging; it isPAGE_SIZEnow.refactor(email): name the weekly review quotes, drop redundant spreads (#5083, #5154, #5156). The weekly review picked its quotes asLIFE_QUOTES[2],[13]and[23], so inserting or reordering a quote in the Life catalog would silently change what the email sends, and the test only asserted the quote came from the catalog at all. The three are named constants now, exported asREFLECTION_EMAIL_QUOTES, with the catalog built from the same constants; the test asserts against that list and that the catalog still contains it. Verified the rendered selection is unchanged (same three strings, same order). Twolines: [...(cond ? [a] : [b])]spreads fold into the arrays they copied.Noted and deliberately left alone: the
prepared.pngBase64read path inreflection-dispatch.tsis still live transitional code for editions queued before the PDF switch (#5158/#5161) and should drain on its own; andrenderReflectionLife{Svg,Png,Pdf}still thread a positional(birthDate, date, lifeUrl)triple of same-typed strings, worth an input object in a follow-up that is not squeezed under the size rails with this one.Verify
bun lint,bun knip,bun type-check: pass.bun test:core,bun test:sync:fast,bun test:web(booking + settings),bun test:backend:fast(email): pass.PRE-EXISTING (fail on
origin/mainin this sandbox too, unrelated to the diff):packages/coreconfigureHttpServer > does not reject a request that exceeds maxHeadersCountpackages/backendemail Mongo-backed specs (computeEmailSendHeartbeatand the*.db.test.tsset): the sandbox cannot bind::, somongodb-memory-servernever starts. The same binding failure blocksbun test:sync*.db.test.ts, includingcalendar-repair.service.db.test.tsandreflection-read.service.db.test.ts, which cover the sync commit; CI runs them.bun run verify --strictwas still running when this PR opened; itsVERDICT:line follows as a comment and CI is the gate.Generated by Claude Code