Skip to content

Bring CLAUDE.md up to date with the audit fixes - #23

Merged
renrenmimi merged 2 commits into
masterfrom
chore/claude-md-after-audit
Oct 10, 2026
Merged

renrenmimi merged 2 commits into
masterfrom
chore/claude-md-after-audit

Conversation

@renrenmimi

Copy link
Copy Markdown
Owner

Summary

Branches from #9 (commit 2148ad8), the only other PR that touches CLAUDE.md. Its rule on Chinese line breaks stays as it is.

The project notes still described the course as it was before this round. This PR brings them in line with what #9–#22 changed, so a later session does not reintroduce what the round fixed. It changes documentation only.

Changes

Verification

🤖 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>
The project notes still described the course as it was before this round.
They now match what the fix PRs (#9–#22) changed:

- The compiler build step runs before npm test too. Only worker.js under
  public/tslab/ is tracked (#14); the compiler is about 11 MB unpacked and
  about 2 MB on first transfer (#14).
- File layout: each chapter's server layout.tsx exports its metadata,
  app/document-title.tsx follows the reader's language, app/not-found.tsx
  is the 404 page, and app/fonts/ holds the self-hosted fonts (#10).
- Lab presets can give their code per language (#14). While the compiler
  loads or after it fails, a banner sits above the editor and the code
  stays readable, with a retry and a Playground link that carries the
  code (#14).
- The quiz section is called 本章测验 / Chapter quiz, as on DataData and
  AlgoAlgo, and the stated range is 7–12 questions, which is what the
  chapters deliver (7 on the prologue, 11 on chapters 02 and 09, 12 on
  the finale).
- Fill-in answers are compared after NFKC normalisation, whitespace
  removal and quote folding (#13).
- One rendering per term: 注解 for annotation, 悬停 for hover,
  非空断言 for `!`, 动手任务 for labs, 本章测验 for the quiz (B23).

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

vercel Bot commented Oct 10, 2026

Copy link
Copy Markdown

Deployment failed for project tser with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/renrenmimis-projects?upgradeToPro=build-rate-limit

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 commented Oct 10, 2026 •

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:15:14.139963Z e2db4b8 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.

@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: e2db4b85d1

ℹ️ 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 +97
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 !== "—";
if (stray) at(start + m.index!, `space ${a} ${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 Detect ordinary same-line Chinese gaps

When an extra space is written on the same line, this predicate only reports full-width punctuation or an ellipsis followed by Chinese; it omits the ASCII punctuation handled by breakIsStray and also omits Han-to-Han gaps. Consequently existing text such as 真名: 使用处 in app/generics/page.tsx and 删掉, 换成 in lib/generics-data.tsx passes this new test despite rendering the spacing that the documented invariant says it prevents. Extend the same-line check to cover these boundaries.

Useful? React with 👍 / 👎.

@renrenmimi
renrenmimi merged commit f7adc58 into master Oct 10, 2026
1 of 2 checks passed
@renrenmimi
renrenmimi deleted the chore/claude-md-after-audit branch October 10, 2026 06:22
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