Skip to content

perf: refactor ECG annotation platform with security and performance … - #5

Merged
JJ704sd merged 1 commit into
mainfrom
codex/optimize-bundle-and-lint
Apr 7, 2026
Merged

perf: refactor ECG annotation platform with security and performance …#5
JJ704sd merged 1 commit into
mainfrom
codex/optimize-bundle-and-lint

Conversation

@JJ704sd

@JJ704sd JJ704sd commented Apr 7, 2026

Copy link
Copy Markdown
Owner

…fixes

Security:

  • Move Firebase config to environment variables
  • Add SSRF protection for GitHub URL imports
  • Add Minimax API proxy server to avoid exposing API keys

Performance:

  • Fix stack overflow in signalProcessor with large arrays
  • Fix arrayBufferToBinaryString using TextDecoder
  • Add Redux memoized selectors for optimized re-renders

Code Quality:

  • Split AnnotationStudio into smaller components
  • Add ErrorBoundary component
  • Optimize Firestore searchPatients with pagination
  • Fix CSV export for mismatched lead lengths
  • Implement annotation persistence to Firebase

…fixes

Security:
- Move Firebase config to environment variables
- Add SSRF protection for GitHub URL imports
- Add Minimax API proxy server to avoid exposing API keys

Performance:
- Fix stack overflow in signalProcessor with large arrays
- Fix arrayBufferToBinaryString using TextDecoder
- Add Redux memoized selectors for optimized re-renders

Code Quality:
- Split AnnotationStudio into smaller components
- Add ErrorBoundary component
- Optimize Firestore searchPatients with pagination
- Fix CSV export for mismatched lead lengths
- Implement annotation persistence to Firebase

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JJ704sd
JJ704sd merged commit 89683fd into main Apr 7, 2026
1 of 2 checks passed
JJ704sd pushed a commit that referenced this pull request Jun 6, 2026
Risk #4 (demo / non-clinical boundary) closed by 1964487: the new DemoBanner plus AIModels MOCK chips and Dashboard sourceLabel alert make the boundary visible in every page of the deployed site.

Risk #8 (ECGFounder external PR) closed by the user's confirmation screenshot: PR #1 is open against the upstream PKUDigitalHealth/ECGFounder repo (not just the fork), 5 commits / 16 files / +27,782 lines, no conflicts.

Remaining P1 risks are now just #5 (UI e2e tests) and #6 (bundle lazy split). CI status and HEAD pointer also refreshed to 1964487.
JJ704sd pushed a commit that referenced this pull request Jun 6, 2026
Risk #6 (bundle budget / lazy split) closed by bb85031: main entrypoint is now 1.5 MiB (28 + 600 + 907 + 4 KiB), down from 1.76 MiB, with Firebase SDK and @firebase/* sub-packages split into async chunks that only load when AnnotationStudio mounts. Webpack performance budget tightened to maxEntrypointSize: 1 600 000 (1.5 MiB + ~50 KiB headroom) with hints: error still on, so any future regression surfaces as a CI failure.

Remaining P1 is now just risk #5 (UI / e2e tests).
JJ704sd pushed a commit that referenced this pull request Jul 4, 2026
Sync README / AGENTS / CLAUDE / REVIEW / CHANGELOG / docs/demo-startup.md with the 2026-07-04 round (R-01 diagnosis.source, R-02 MOCK chip, C-01..C-05 Redux SOT, e2e scaffolding, webpack performance hints:'error').

- REVIEW.md: add 2026-07-04 P0 audit + canvas closeout round section, retag risk #1/#6/#7 closed, demote #5 partially mitigated, refresh verification table (109/109 unit, lint/typecheck/build green).

- README.md: P/Q/R/S/T/ST/U annotation kinds (C-03 fix), diagnosis.source provenance (R-01), persistent SignalMetrics MOCK chip (R-02).

- CHANGELOG.md: Unreleased entry listing 8 commits (C-01..C-05, R-01, R-02, audit docs, env config rewrites).

- docs/demo-startup.md: Demo / non-clinical boundary reminder covering banner, MOCK chip, diagnosis.source, IndexedDB cache path.

- docs/superpowers/plans/2026-07-04-bug-audit-and-closeout-checklist.md: post-audit progress block under section 3; de-dupe BUG-2026-07-04-1 heading.

git diff --check exit 0; no whitespace errors; UTF-8 clean across all five files (no U+FFFD).
JJ704sd pushed a commit that referenced this pull request Jul 7, 2026
本轮重写覆盖范围:

- 5 P0 全部 close (A-01, A-03, C-12, D-1, D-2)
- 11 / 23 P1 close (A-02, A-04, A-05, B-03, B-04, B-05, C-11, C-14, C-15, D-3, D-4)
- 12 P1 残留 (A-06/07/08/09/10/12/14 model contract + B-06/07 firebase UX + C-06/07/19) 进下一轮
- 20 P2 + 6 P3 残留 (进 backlog)

诚实记录两条风险:
- Track M (5e8e9b0) + Track F (d2f3a51) commit 不存在,worker session 工作丢失 (M=7 P1 / F=2 P1 都没落地)
- Track D2 (d33a348) 是 dangling commit,通过 cherry-pick 救回到 fix/d2-bundle-hygiene

新增的 P1 closeout 章节:
- CHANGELOG: Added / Changed / Fixed (P0 + P1 closed + P1 still open) / Risks and known gaps / Verification
- REVIEW: top-level '2026-07-07 batch 1+2 P1 closeout round' 段 + 仓库状态更新 + 风险 #3 标记 close + 验证结果表 + 建议下一步 8/9/10 条覆盖残留 P1 / P2 / P3

风险 #5 bundle 预算同步脚本 (b995732) 锁契约通过 pwsh scripts/check-bundle-budget-sync.ps1 验证 0。
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