Skip to content

fix(app): pass streamGap accessor to SessionStreamVeil (fixes blank session view) - #1245

Merged
jack-champagne merged 1 commit into
mainfrom
fix/session-stream-veil-accessor
Sep 17, 2026
Merged

jack-champagne merged 1 commit into
mainfrom
fix/session-stream-veil-accessor

Conversation

@jack-champagne

@jack-champagne jack-champagne commented Sep 16, 2026

Copy link
Copy Markdown
Member

Problem

The session view goes blank on tab switch, message send, and new session. The SPA console shows:

TypeError: t.degraded is not a function
    at get when (index-*.js)   // the <Show when={props.degraded()}> getter

Root cause

SessionStreamVeil (the #1203 SSE-loss veil) types its prop as degraded: Accessor<boolean> and calls props.degraded() internally. But the call site in session.tsx passed degraded={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

- <SessionStreamVeil degraded={streamGap()} ... />
+ <SessionStreamVeil degraded={streamGap} ... />

createStreamGap() returns a createMemo (an Accessor<boolean>), so passing streamGap matches 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 parses session.tsx and asserts degraded={streamGap}.

Manifest refreshed for the two edited overlay files (drift gate passes locally).

Verify

The vsix-gate CI job builds an installable amicode.vsix (artifact amicode-vsix) on this PR — install it and confirm the session view survives tab switch / send / new session.

Summary by CodeRabbit

  • Bug Fixes

    • Improved session stream monitoring so the degraded-state veil updates reliably as stream conditions change.
    • Fixed an issue where session stream gaps could be evaluated too early, potentially causing the veil to display outdated status.
  • Tests

    • Added regression coverage to help ensure session stream degradation remains accurately reflected in the interface.

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.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 73e5cb0c-f97f-4d53-8ea8-32faa408f229

📥 Commits

Reviewing files that changed from the base of the PR and between c9ea35d and 77a7c82.

📒 Files selected for processing (3)
  • packages/app-bundle/manifest.json
  • packages/app-bundle/overlay/packages/app/src/components/session-stream-veil.test.ts
  • packages/app-bundle/overlay/packages/app/src/pages/session.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Session stream veil correction

Layer / File(s) Summary
Reactive prop wiring and manifest update
packages/app-bundle/overlay/packages/app/src/pages/session.tsx, packages/app-bundle/overlay/packages/app/src/components/session-stream-veil.test.ts, packages/app-bundle/manifest.json
SessionStreamVeil now receives the streamGap getter. A regression test checks this source expression. The bundle manifest hashes and extraction timestamp were refreshed.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: aarontrowbridge

Merge Risk: ⚪ Minimal · up to 77a7c

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning 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 verifi… Add a linked GitHub issue using the required Closes # format. Select the applicable Type of Change checkbox. Record completed build, test, typecheck, and manual verification results in the required sections.
Docstring Coverage ⚠️ Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main fix: passing the streamGap accessor to SessionStreamVeil.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

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 Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/session-stream-veil-accessor

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jack-champagne
jack-champagne merged commit d8974cf into main Sep 17, 2026
12 checks passed
@jack-champagne
jack-champagne deleted the fix/session-stream-veil-accessor branch September 17, 2026 00:35
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.

1 participant