Repository navigation
Build the audit recommendations: safer backups, faster Phrase Bank, deeper TC101–TC109, card links, Library groups, header title on scroll - #139
Merged
Conversation
…month drill cap
- Export backups through the share sheet (Save to Files) where files can be
shared, falling back to a download link. The backup reminder only records
a backup when the share finishes or the download starts; closing the
share sheet records nothing. The reminder nudge stays up on cancel.
- Restore keeps a snapshot of the replaced data (tc_restore_snapshot,
device-only, never in backups) and Settings > Backup offers Undo restore
for 30 days.
- Reject backup files over 5 MB before reading them; a backup from a newer
app version asks the reader to update first; versions 1 and 2 restore.
- Backup format v2 adds tc_start_opened, tc_recent_cards and
tc_welcome_dismissed.
- Saved-phrase guard: a committed hashed snapshot of every saveable phrase
fails the tests when one disappears without a REPHRASED or retired entry.
- Cap drill review intervals at 180 days ("In ~6 months").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
…p situation
- Bring the nine newer cards up to the depth of older cards: instruction-style
minimum moves (library summaries updated to match), depth dials, more
phrase groups (patients/clients/families, in writing, high stakes), and
extra not-for, decision tree, ladder, scenario, calibration, mistake,
recovery, chain, related-technique, checklist and example-note entries.
Existing phrase text is unchanged; only additions.
- Add a ninth Help me right now situation, "They're very distressed or might
not be safe", led by Emotion before facts (TC098) with a Safety first note
pointing to the organisation's protocol and 000. Its lines live in a new
TC098 "Checking in on safety" phrase group.
- Add a scope note ("This app helps with words, not clinical risk
decisions") to the Help picker and the Library welcome.
- Every new safety line carries a CLINICAL REVIEW NEEDED comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
…lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
Card text cites other techniques by bare id ("Apologise (TC101)",
"TC003, then TC001"). A small pure parser (lib/card-refs.ts, unit tested)
splits such text into plain runs and references; CardRefText renders each
known reference as a link to /card/TCxxx that names the technique. When the
author's words already name the card they become the link; a bare id is
replaced by a light chip carrying the title. Unknown ids stay as written,
self-references are not linked, and text inside a button (related rows,
depth dial) shows the titles without nesting a link. Decision-tree rows that
cite a card split the copy button to just the phrase so the link is real.
Covers Skip it when, decision tree, calibration, chains, method, depth dial,
practice tasks and related reasons. Card data is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
Connection (54), Clarity (28) and Resilience (16) now show as short groups
under their own headings, named by what the reader wants to do ("Draw them
out", "Raise a problem or say no", "Repair after a misstep"). Grouping lives
in lib/category-groups.ts (ids only, so it stays on the light first-paint
path) and a new GroupedCardList component; library.tsx only swaps its list
for it. Filters, search and Start-here sort apply within groups; flat sorts
stay one list. A test keeps every card in exactly one group.
Moves clearly misplaced cards into Connection: TC007 No one-upping and TC009
Anti-boomerasking (from Resilience), TC012 Full-attention signal and TC015
Premature advice restraint (from Clarity).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
iOS large-title pattern. Pages mark their visible title with usePageTitleRef(); the header watches it with an IntersectionObserver and fades its own copy of the name in only once that title is under the bar, so "Saved" over "Saved", the card title twice on phones and "Phrase Bank" twice on desktop are gone. A screen-reader-only h1 (PageIntro and Drill on phones) counts as not drawn, so those pages keep the header title. The header copy is aria-hidden where a page h1 exists; the card's header h1 keeps its role. The "TC Reference" eyebrow is hidden from md up, where the sidebar carries the name, and the sidebar now says "TC Reference" to match. Reduced motion snaps via the existing app-header rule. Also removes the serif from Saved phrases (shared file with this change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
Every sayable line now uses Inter through one token (--app-font-phrase, applied by .phrase-text): search results, Saved and drill recall no longer switch to Georgia. Serif stays only on the printed/shared quote card. The best line on Use it (and the ladder's best rung) gets a light green wash via --best-tint; weak stays neutral. Measured contrast: Best label 6.2:1 light / 8.4:1 dark, line text >= 12:1. Also holds the card cross-reference link and chip styles (index.css). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
…can, HSTS - Precompute the Phrase Bank count at build time (virtual:phrase-bank-summary, same aggregation as the page via the new phrase-aggregate.ts) so the intro, the page's LCP element, paints before the text index loads. - Cold loads render the first 24 rows, then fill the first page in idle batches; return visits render every row on the first frame. - Add scripts/check-bundle-budget.mjs (gzip budgets ~10% over current for entry JS, vendor JS, main CSS, card-text-data) and run it after the build in code-review.yml. - Add e2e/a11y.spec.ts: axe-core 4.13.0 WCAG 2.x A/AA plus label-content-name-mismatch on every main route; fix the prev/next card button names it flagged. - Send HSTS only for requests that arrived over HTTPS (x-forwarded-proto or TLS socket), with a server test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
The new 'They're very distressed or might not be safe' situation, the TC098 'Checking in on safety' lines, the safety not-for lines on TC105, TC108 and TC109, and the scope notes move to their own pull request so they can be clinically reviewed before release. The dormant safetyNote support stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
…design round Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…v1 restores - Remove any older restore snapshot before saving a new one, and retry a restore once without the snapshot if storage runs out, so Undo can never bring back data from before an earlier restore. - Backups use the share sheet only on iPhone and iPad; Android and desktop download as before. A failed share reports failure instead of a download without a user gesture. - Restoring a version 1 backup keeps Start here progress, recent cards and the welcome flag, which v1 files never carried. - Method steps don't link a card to itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxPPxjtHCQRLDHwTbGHhTp
BigSimmo
marked this pull request as ready for review
November 21, 2026 19:42
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Requested by josh · project thread
Summary
This builds the recommendations from the PWA and design audit (#137), which josh approved. The distress Help situation and its safety wording are in a separate PR so they can be clinically reviewed first.
Data safety
tc_restore_snapshot, never itself backed up). Settings → Backup offers "Undo restore" for 30 days.REPHRASEDor retired entry. The test explains how to fix it.Speed, CI and security
budgetscript runs incode-review.yml. Current sizes are entry 34.3, vendor 59.4, CSS 12.7 and card-text 178.5 KB gz, all at about 90% of budget.e2e/a11y.spec.tsruns axe WCAG 2.x A/AA plus label-in-name on all 10 main routes.axe-coreis pinned at 4.13.0. The scan found and fixed one mismatch, the prev/next names.server.mjssends it only on HTTPS, byx-forwarded-protoor a TLS socket.Content
Design
card-refs.ts,card-ref-text.tsx).--app-font-phrasetoken. Serif stays only on the share image and print card. The Best example and the ladder's Best rung get a light green tint (contrast ≥ 6.2:1).Before/after screenshots are in the project files under
pwa-audit/round2/(design/before|after,data-safety/,content/,perf.md).Checks
e2e-webkit.ymlruns it, including the new axe spec for the first time.Generated by Claude Code
Summary by cubic
Builds the approved PWA and design audit recommendations across data safety, performance, and design.
Data safety
REPHRASEDor retired entry; drill review gaps cap at ~6 months.Performance, CI and design
Written for commit 0634bfd. Summary will update on new commits.