Skip to content

fix(explainer): localize automatic workflow branch labels - #1095

Merged
tt-a1i merged 2 commits into
devfrom
maintenance/fix-explainer-lane-locale-1082
Oct 25, 2026
Merged

tt-a1i merged 2 commits into
devfrom
maintenance/fix-explainer-lane-locale-1082

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Problem and value

Refs #1082. On dev 82c7e0f, an English workflow shorthand branching from Build to Ship/Roll back generates 分支 1 in its lane name, node context, SVG title and accessible name. Automatic branch lanes now use Branch N for non-zh locales and retain 分支 N for zh-prefixed/default pages, matching the Explainer reader fallback. Authored lanes and wrapped-band titles retain their text.

Metadata may appear after the shorthand. The parser keeps its original compilation timing for quality, title, source anchors and automatic block IDs, then recompiles only workflow shorthand requiring non-Chinese labels with the final locale. Its spec locations retain the original directive span. Explicit native specs and referenced source files are unaffected; no translation framework or layout algorithm is added.

Attribution and AI assistance

Adapted the narrow branch-label correction and CLI/compiler regression ideas from @BlueboxC's 897cbbf0, which also contains unrelated fork fixes that are not imported here. Added coverage for late metadata, source locations, automatic IDs and original quality.

  • AI use: Codex (configured gpt-6.1-sol) assisted investigation, adaptation, tests, review and writing.
  • Accountable contributor: @tt-a1i.
  • I reviewed the submitted changes and explanation, understand their impact, and can answer questions about them.

Impact and verification

The change is limited to generated shorthand lane text and its derived reader/accessibility context. Tests preserve authored labels, wrapped titles and all other native spec fields. The matched three-node en/zh-CN sample at 390px keeps the same SVG viewBox, geometry attributes and node/text bounds; this is a bounded comparison, not a universal claim that translated text can never affect measurements. Existing English toolbar overflow remains the separate #1076 behavior.

Base 82c7e0f; candidate 323b3196:

  • Regression fails on the current base; parser/diagram/public-CLI suites pass 55/55, no skips. CLI matrix: en, es, zh-CN, zh-TW, zh-Hant and default. Original draft bytes, node context, SVG titles and accessible labels are checked; late metadata additionally preserves source-map spans, automatic IDs and original quality.
  • Real Ego Lite Chrome at 390px confirms actual English Branch 1 and Chinese 分支 1 context, accessible name and SVG title on the same source input. Screenshots were inspected by the agent; personal human review remains separate.
  • npm run test:generated: pass. Release/package gates: 36 pass, 2 platform skips.
  • Canonical Node22.23.3/zlib1.3.1-e00f703 ZIP rebuilt. Only packaged explainer/parse.mjs and explainer/diagrams.mjs differ. Checked-in shorthand showcase sources are zh-CN and keep their output; no unrelated gallery or README proof refresh is included.

Required final-head hosted CI and maintainer acceptance remain pending. No release, deployment or live installation is claimed.

Apache baseline integration (2026-10-25)

Normally merged exact dev 3f95f0349c8276db71509ca239461b6fe9d00f9f into the original author history; new head 1e37c5e1c55a51736d7cbbf4761580b96121aba4. Source merged without conflict; only the binary ZIP conflicted and was rebuilt from combined source. Apache LICENSE, legacy LICENSE-MIT, NOTICE, third-party notices and the offline notice module match the exact base; the actual extracted package retains those bytes.

New local focused check: node --test test/explainer-parser.test.mjs test/explainer-diagrams.test.mjs test/explainer-cli.test.mjs.

1..55
# tests 55
# suites 0
# pass 55
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 9281.255666

Full smoke through the actual extracted ZIP passed, including licensing and third-party notice contracts. Two official Node 22.23.3 / zlib 1.3.1-e00f703 canonical builds are byte-identical, SHA-256 100d09a173137b277f899ca2c6cc0d139a2f635e738dacd3307cf253d12f88ac. git diff --check passes; checkout committed clean. Earlier behavior evidence is reused only for unchanged responsibilities; Apache notices are an intentional added output detail. Prior hosted CI belongs to the stated prior heads. Final-head hosted CI remains pending; no green result, release or live installation is claimed.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Preserve author history and Apache-2.0, legacy MIT and third-party notices. Rebuild the distributable from combined source with the canonical Node 22 toolchain.
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.

1 participant