fix(visual): mask context-token counter in electron sidebar snapshot - #1680
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (4)Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.⚙️ CodeRabbit configuration file Files:
Reserve end-to-end coverage for behavior that requires the real VS Code host, workspace APIs, extension activation, webview messaging, file watchers, or a full workflow.⚙️ CodeRabbit configuration file Files:
Act as an adversarial second-opinion reviewer.⚙️ CodeRabbit configuration file Files:
Keep the Electron matrix limited to high-value shell integration scenes that require the real VS Code host.📄 CodeRabbit inference engine (apps/vscode-e2e/AGENTS.md) Files:
🔇 Additional comments (1)
📝 SummarySummary by CodeRabbit
WalkthroughThe Electron visual smoke test masks dynamic context-token counter elements when it captures the sidebar screenshot. The mask targets both token count and context window size elements inside the Zoo Code webview frames. ChangesVisual Snapshot Stabilization
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: The required review sequence passed. Remaining merge requirements apply. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
48c1820 to
4bd3a4c
Compare
4bd3a4c to
137095e
Compare
137095e to
92679b6
Compare
Related GitHub Issue
Closes: #1679
Description
The
extension-host-visualjob has failed on every PR since run #2252. PR #1505 changed the generated system prompt, which reduced the token count shown in the live context-token counter from4.2k / 1.0mto3.1k / 1.0m. That difference caused theelectron-chat-dark-sidebar.pngsnapshot comparison to fail on all three Playwright retries.The root cause is structural: the visual regression workflow does not monitor
src/core/prompts/**, so the breakage shipped undetected.Fix — use Playwright's
maskoption to overlay the two token counter elements before comparing the sidebar screenshot:The mask replaces the dynamic token values with Playwright's default pink overlay at screenshot time. It does not touch the DOM, so there are no timing or CSP issues. The progress bar and surrounding layout remain in the snapshot. The
welcome-darkandwelcome-high-contrastscenarios are unaffected — Playwright ignores a mask locator that matches no elements.The baseline is updated to match the new rendering (pink overlay over token values).
Test Procedure
extension-host-visualCI job on this PR passes — all 3 repeats produce an identical screenshot (96bd934c).src/core/prompts/**no longer cause this job to fail.Pre-Submission Checklist
🤖 Generated with Claude Code