Skip to content

Correct the finale's as answer and summaries, and fix three details in chapter 10 - #22

Merged
renrenmimi merged 2 commits into
masterfrom
fix/content-tsconfig-mindset
Oct 10, 2026
Merged

renrenmimi merged 2 commits into
masterfrom
fix/content-tsconfig-mindset

Conversation

@renrenmimi

Copy link
Copy Markdown
Owner

Branches from #9 (commit 2148ad8), so it can be merged before or after it, and independently of #10–#21.

It touches chapter 10 (app/tsconfig/page.tsx, viz.tsx, lib/tsconfig-data.tsx) and the finale (app/mindset/page.tsx, viz.tsx, lib/mindset-data.tsx).

Summary

Fixes from the 2026-10-09 content audit (04-TSer-内容.md):

  • B4 (high)
    • The wrong answer: the finale's task 1 said "misspell theme as thema → as: accepted".
    • What the compiler reports: TS2352. A misspelled key leaves one field missing and one extra, so the two types are not comparable.
    • The hint: it also said the table matches §01's traffic lights exactly. But §01's question 1 adds a field rather than misspelling one.
  • B10: five places summarised as as "no check". These were the §01 explanation, the traffic-light stance, the visual's summary, the key point and the quiz explanation. They contradicted the chapter's own callout "What as actually lets through", which explains the comparability rule.
  • B11: the two fill-in questions rejected 'dark' and 'oolong' | 'mango'. Keep quiz focus, announce verdicts, and accept IME and single-quote answers #13 also folds quotes when answers are compared, so this PR and Keep quiz focus, announce verdicts, and accept IME and single-quote answers #13 each fix it on their own.
  • B12 (finale hero): it said "the JavaScript that runs is the JavaScript you wrote", with no allowance for enums or parameter properties.
  • B19:
    • "Four steps down, four things rewritten": there are three steps.
    • TS5052 does not mean the compiler "refuses to run". tsc exits non-zero and still emits.
    • @ts-ignore at the top of a file does not silence the whole file. That is // @ts-nocheck.
  • B20:
    • satisfies on the fourth draft also reports TS2339.
    • const total: number = 22 does tell the compiler something: it widens 22 to number.
    • "Change maxSugar: 7 to "7"" did not say which draft to edit.
    • "The comparison above is written down." was stiff English.
  • B24: the TS2352 quote dropped its second sentence, "convert the expression to 'unknown' first".
  • B21, B22, B23, A26: 通关测验, one colloquial quote (干嘛), 标注 → 注解, and aria-pressed on the segmented buttons.

Changes

  • Finale
    • Task 1 solution: each of the nine cells now shows its real result.
      • Misspelled key: TS2561 / TS2352 / TS2561.
      • Missing key: TS2741 / accepted / TS1360.
    • Task 1 hint: it now says one cell differs from §01 and points to the callout that explains why.
    • The five as summaries: they now read "only checks that the types are comparable". The visual's summary marks it as 检查 △(只查可比较).
    • satisfies, widening and the "7" experiment:
      • The TS2339 sentence is added.
      • The const total example now says the annotation widens 22 to number.
      • The "7" experiment names the second draft.
    • TS2352 quote: the full text is quoted, with a sentence on what as unknown as Config gives up.
    • Hero: it adds "apart from a few constructs that generate code".
    • Fill-in answers: single-quoted forms are accepted.
  • Chapter 10: the target note, the TS5052 sentence, and the migration quiz now uses // @ts-nocheck.
  • Both chapters: 注解, formal Chinese, 本章测验 / Chapter quiz, and aria-pressed on seg-btn.

Verification

  • npx tsc --noEmit --incremental false: clean.
  • npm test: 6 files, 38 tests pass, including zh-copy-spacing.
  • npm run build: succeeds.
  • Checked with the lab worker on TypeScript 5.9.3:
    • All nine cells of task 1, with the codes listed above.
    • The fourth draft with satisfies: TS1360 plus TS2339.
    • The second draft with "7": the full TS2352 text quoted here.
    • A file whose first line is // @ts-ignore still reports the third line, and // @ts-nocheck reports nothing.
  • Checked with the real tsc: --exactOptionalPropertyTypes without strictNullChecks gives TS5052 and exit code 2, and still writes out/a.js.
  • Headless Chrome against a local next start, both languages:
    • The new text is present and there are 0 console errors.
    • The checker could not see task 1's solution, because only one task opens at a time. That text was confirmed in the source.
    • The only other "check is skipped" left is a different quiz option, about freshness.

🤖 Generated with Claude Code

renrenmimi and others added 2 commits October 9, 2026 16:07
JSX trims each line of a text block and joins the lines with one space.
The Chinese copy is wrapped across source lines throughout the course, so
it rendered with spaces between Chinese characters and around full-width
punctuation: 1,572 of them in 36 files.

- 1,548 line breaks are joined by a script that walks the TypeScript
  syntax tree and touches only JSX text and JSX attribute strings, never
  code samples, template literals or comments. Breaks next to Latin
  letters, digits, expressions, "——" or operators keep their space.
- 24 more spaces go: 20 after full-width punctuation, 3 between Chinese
  text and a tag whose text is Chinese, and one {" "} between a
  full-width mark and Chinese text.
- test/zh-copy-spacing.test.ts, the check DataData and AlgoAlgo use,
  scans every TSX file and fails on any new stray space; CLAUDE.md states
  the rule.

Apart from the one {" "}, the diff changes nothing but whitespace. The
text every edited file renders differs from master only by deleted
spaces, each next to Chinese text, so the English copy is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…apter 10

Finale
- Task 1's answer: a misspelled key under as is TS2352 (one field missing, one extra, so the
  types are not comparable), not "accepted"; the table now lists the real code for each of
  the nine cells, and the hint no longer says the table matches section 01 exactly.
- The section 01 explanation, the traffic-light stance, the visual's summary, the key point
  and the quiz explanation describe as as a comparability check, as the "What as actually
  lets through" callout already did, instead of "no check at all".
- satisfies on the fourth draft also reports TS2339; const total: number = 22 widens 22;
  the "7" experiment names the second draft; the TS2352 quote is complete and explains what
  "as unknown as" gives up; the hero allows for the constructs that generate code.
- The two fill-in questions also accept single-quoted answers.

Chapter 10
- The target note counts three steps, not four; TS5052 is an options error after which tsc
  exits non-zero, not a refusal to run; whole-file suppression is // @ts-nocheck, because
  @ts-ignore only covers the next line.

Both chapters
- 注解 instead of 标注, formal Chinese, quiz titles 本章测验 / Chapter quiz, and
  aria-pressed on the target and three-forms segmented buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 06:02
@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tser Ready Ready Preview Oct 10, 2026 6:04am UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7ff849a6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +94 to +96
for (const m of raw.matchAll(/(\S)( +)(\S)/g)) {
const a = m[1], b = m[3];
const stray = (PUNCT.test(a) || (a === "…" && closesChinese(raw, m.index!))) && ZH.test(b) && b !== "—";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check ASCII punctuation in same-line spacing

The same-line scan only treats PUNCT (which contains CJK/full-width punctuation) and … as preceding punctuation, even though breakIsStray explicitly handles the ASCII , : ; ? ! characters used throughout this codebase. Consequently existing violations such as lib/type-magic-data.tsx:679 (比较, 是) and lib/generics-data.tsx:689 (例外, 绝大多数) pass the newly added test, so it does not enforce the spacing convention it claims to cover.

Useful? React with 👍 / 👎.

Comment thread app/mindset/page.tsx
Comment on lines +924 to +926
<code>const total: number = 22</code> only widens the inferred{" "}
<code>22</code> to <code>number</code>; it tells the compiler
nothing new, and it makes the code longer and harder to change.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't call the widening annotation information-free

When readers compare these two declarations, const total = 22 has the literal type 22, while const total: number = 22 has type number (including in an emitted declaration). The sentence now acknowledges that observable widening and immediately says the annotation tells the compiler nothing new, which is self-contradictory and preserves the inaccurate lesson this change is intended to correct; the annotation explicitly communicates the desired wider type, even if that is often unnecessary.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T06:10:21.130941Z d7ff849 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@renrenmimi
renrenmimi merged commit d135fa9 into master Oct 10, 2026
3 checks passed
@renrenmimi
renrenmimi deleted the fix/content-tsconfig-mindset branch October 10, 2026 06:22

This branch was successfully deployed

1 active deployment
Preview — d7ff849a Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants