Skip to content

Fix leaked Google Docs comment markers on the clusters page#826

Merged
richarddushime merged 1 commit into
mainfrom
fix-clusters-comment-markers
Jul 2, 2026
Merged

Fix leaked Google Docs comment markers on the clusters page#826
richarddushime merged 1 commit into
mainfrom
fix-clusters-comment-markers

Conversation

@LukasWallrich

Copy link
Copy Markdown
Contributor

Summary

  • Six cluster/sub-cluster descriptions on the live /clusters/ page showed literal bracket artifacts like process:[ag][ah] and feedback[ai][aj], have received instead of clean prose.
  • Root cause: scripts/parse_clusters_to_sheet.py fetches the source Google Doc via its plain-text export (export?format=txt). Google Docs' plain-text export represents unresolved inline comments as bracketed reference codes (a, b, ... aa, ab, ...) inserted directly into the body text at the comment's anchor point.
  • The script already had an extract_annotations() helper built for exactly this pattern (used for citation text and sub-cluster ToC names), but the code paths that build cluster- and sub-cluster-level description text appended the raw, uncleaned line instead — 5 call sites across parse_cluster_toc(), parse_subclusters_standard(), and parse_cluster_11().

Changes

  • Fixed all 5 call sites to strip annotation markers, so future re-syncs from the Google Doc won't reintroduce this even if comments are left open.
  • Directly cleaned the 6 already-leaked instances in data/clusters_v4.json with a minimal, scoped fix targeting only the affected fields — not a full re-sync from the live doc, to avoid pulling in unrelated content drift.

Test plan

  • Rebuilt the site locally and confirmed 0 occurrences of the leaked markers in the rendered /clusters/ page
  • Confirmed the diff only touches the 5 affected description fields, nothing else

🤖 Generated with Claude Code

Six cluster/sub-cluster descriptions on the live clusters page showed
literal bracket artifacts like "process:[ag][ah]" and "feedback[ai][aj],
have received". Root cause: parse_clusters_to_sheet.py fetches the
source Google Doc via its plain-text export
(docs.google.com/.../export?format=txt), and Google Docs' plain-text
export represents unresolved inline comments as bracketed reference
codes (a, b, ... aa, ab, ...) inserted directly into the body text at
the comment's anchor point.

The script already had an extract_annotations() helper for exactly
this pattern (built for citation/publication text and sub-cluster ToC
names), but the code paths that build cluster- and sub-cluster-level
*description* text appended the raw, uncleaned line instead - five
call sites across parse_cluster_toc(), parse_subclusters_standard(),
and parse_cluster_11(). Fixed all five so future re-syncs from the
Google Doc won't reintroduce this even if comments are left open.

Also directly cleaned the six leaked instances already baked into the
committed data/clusters_v4.json (a minimal, scoped find/replace on
just the affected fields - not a full re-sync from the live doc, to
avoid pulling in unrelated content drift).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@LukasWallrich LukasWallrich requested a review from a team as a code owner July 2, 2026 10:29
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 2 changed file(s)! 🎉

@LukasWallrich

LukasWallrich commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-07-02 12:54:12 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

@richarddushime richarddushime merged commit 63958b3 into main Jul 2, 2026
5 checks passed
@richarddushime richarddushime deleted the fix-clusters-comment-markers branch July 2, 2026 13:20
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