fix(app): pass streamGap accessor to SessionStreamVeil (fixes blank session view) - #1245
Conversation
session.tsx passed degraded={streamGap()} — the memo's VALUE — but
SessionStreamVeil types degraded as Accessor<boolean> and calls
props.degraded() internally. Calling a boolean throws
'TypeError: t.degraded is not a function' in the <Show when={...}> getter,
blanking the entire session view on tab switch, send, and new session
(the #1203 SSE-loss veil).
Fix: pass the accessor itself (degraded={streamGap}). Add a call-site
regression test (the existing tests only assert the veil's own source, so
they could not catch a caller passing a value instead of an accessor).
Manifest refreshed for the two edited overlay files.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesSession stream veil correction
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The session veil now receives the accessor it expects, with regression coverage protecting the blank-view fix; no material merge risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description clearly explains the problem, root cause, fix, regression test, and verification plan. However, it omits the required Related Issue link, Type of Change selection, and completed verification or manual testing notes. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Problem
The session view goes blank on tab switch, message send, and new session. The SPA console shows:
Root cause
SessionStreamVeil(the #1203 SSE-loss veil) types its prop asdegraded: Accessor<boolean>and callsprops.degraded()internally. But the call site insession.tsxpasseddegraded={streamGap()}— the value of the memo, not the accessor. Calling a boolean as a function throws in the reactive<Show when={...}>getter, which tears down the entire session view → blank screen.This is UI-only: it reproduces on every engine binary (verified with both stock opencode 1.18.31 and fork amicode.29 VSIXs — identical failure), because both share this app bundle.
Fix
createStreamGap()returns acreateMemo(anAccessor<boolean>), so passingstreamGapmatches the prop contract.Test
Added a call-site regression test. The existing veil tests only assert the component's own source (
toContain), so they can't catch a caller passing a value instead of an accessor. New test parsessession.tsxand assertsdegraded={streamGap}.Manifest refreshed for the two edited overlay files (drift gate passes locally).
Verify
The
vsix-gateCI job builds an installableamicode.vsix(artifactamicode-vsix) on this PR — install it and confirm the session view survives tab switch / send / new session.Summary by CodeRabbit
Bug Fixes
Tests