Skip to content

chore: tech-debt cleanup checklist (#51)#64

Merged
Jose-Gael-Cruz-Lopez merged 3 commits into
mainfrom
chore/tech-debt-cleanup
Jul 7, 2026
Merged

chore: tech-debt cleanup checklist (#51)#64
Jose-Gael-Cruz-Lopez merged 3 commits into
mainfrom
chore/tech-debt-cleanup

Conversation

@Jose-Gael-Cruz-Lopez

Copy link
Copy Markdown
Collaborator

Closes #51 — all ten items. Stacked on #63 (base ci/web-app-and-tests). Merge #60#61#62#63 → this.

# Item What changed
1 Duplicated parsing parse_issue_body / parse_state / parse_deadline consolidated into util.py; both scripts call the shared helpers (strip_symbols preserves each one's field keys)
2 Repo identity web/lib/repo.ts (REPO_SLUG/REPO_URL/REPO_RAW_BASE, override via NEXT_PUBLIC_REPO_SLUG) used across web; util.repo_url() (from GITHUB_REPOSITORY) in weekly_digest.py
3 noUncheckedIndexedAccess Enabled; every surfaced nullable handled with safe fallbacks / type-predicate filters (no unchecked !) across lib + legacy components
4 Global Audio patch Now patched lazily from the disc-player component (idempotent), not as a top-level import side effect
5 Scroll-lock race Shared ref-counted lib/scroll-lock.ts used by preloader + detail modal
6 localStorage trust Parsed value validated into a clean TrackerMap (unknown ids/stages dropped)
7 Context coupling Split into useSelection / useTracker so a modal open/close doesn't re-render every deck card
8 Dropped gallery credit caption/credit/credit_url surfaced in the tile alt/title
9 Stray file Removed georgetown
10 Cosmetic auth Client-only /my gate documented at the enforcement point (proxy.ts)

Verification

  • next build + npm run lint + tsc --noEmit + 15 vitest tests
  • ✅ scripts compile + 14 Python unittests

Notes

  • Item 3 touched several unrelated legacy components (the flag is global); all fixes are safe fallbacks, no behavior change.
  • Item 4: a fully no-global approach isn't possible without editing the vendored Framer component; lazy + idempotent patching is the best feasible scoping.

🤖 Generated with Claude Code

Closes #51. All ten checklist items:

1. Consolidate parse_issue_body / parse_state / parse_deadline into util.py;
   auto_extract.py and contribution_approved.py now call the shared helpers
   (parse_issue_body takes strip_symbols to preserve each script's field keys).
2. Single repo-identity source: web/lib/repo.ts (REPO_SLUG/REPO_URL/
   REPO_RAW_BASE, override via NEXT_PUBLIC_REPO_SLUG) used by types-hq.ts,
   parse-readme.ts, next.config.ts; util.repo_url() (from GITHUB_REPOSITORY)
   used by weekly_digest.py.
3. Enable tsconfig noUncheckedIndexedAccess and handle every resulting nullable
   (listings.ts, parse-readme.ts, tracker.tsx, several legacy components) with
   safe fallbacks / type-predicate filters — no unchecked assertions.
4. Scope the Audio monkeypatch to the disc player: patch lazily from the
   component (idempotent) instead of a top-level import side effect.
5. Shared scroll-lock counter (web/lib/scroll-lock.ts) used by the preloader
   and detail modal, so overlapping overlays don't fight over body.overflow.
6. Validate the localStorage payload into a clean TrackerMap (drop unknown
   ids/stages) instead of casting any valid JSON.
7. Split selection vs tracker into separate contexts (useSelection /
   useTracker) so opening/closing the modal no longer re-renders every card.
8. Render gallery caption/credit/credit_url (previously dropped) via the tile
   alt/title.
9. Remove the stray `georgetown` file.
10. Document the client-only /my auth caveat at the enforcement point (proxy.ts).

Verified: next build + lint + tsc --noEmit + 15 vitest tests pass; scripts
compile and 14 Python unittests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Carry the lockfile fix from #63 onto this branch so its Web CI passes rather
than failing at `npm ci` on the inherited out-of-sync lockfile. Regenerated
with npm@11.16.0 (the CI runner version); verified `npm ci`, lint, test
(15/15), build, and tsc --noEmit all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Jose-Gael-Cruz-Lopez Jose-Gael-Cruz-Lopez changed the base branch from ci/web-app-and-tests to main July 7, 2026 15:30
Resolve conflicts from the lower-stack fixes now on main:
- next.config.ts / parse-readme.ts: keep this branch's repo-identity
  consolidation (REPO_SLUG + REPO_RAW_BASE imported from lib/repo.ts) over
  the hardcoded raw URL from the #61 fix.
- lib/repo.ts: set the REPO_SLUG default to the canonical Hack-HQ/hackhq
  (was Jose-Gael-Cruz-Lopez/hackhq) so the #61 owner fix is preserved through
  the consolidation instead of silently reverted.
- The #62 ISR tracing config, #61 cache header, and #62 guarded-read
  re-throws auto-merged cleanly; lockfile auto-merged (identical).

Verified: npm ci, lint, test (15/15), build, tsc, and scripts tests all pass.
@Jose-Gael-Cruz-Lopez Jose-Gael-Cruz-Lopez merged commit 1f38ec5 into main Jul 7, 2026
2 checks passed
@Jose-Gael-Cruz-Lopez Jose-Gael-Cruz-Lopez deleted the chore/tech-debt-cleanup branch July 7, 2026 15:38
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.

[Low] Tech-debt: code quality & maintainability cleanup (checklist)

1 participant