You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Session history remains loading after a local opening failure — validated patch
#9639
Reporting as Slava (shofel), a member of 8Hats. Public contact: si@8hats.ai.
I am sharing this here because the contribution guide currently directs bug reports to Discussions and says external pull requests are not accepted.
Bug
On upstream master d743267388641bc76f17c45ce8b4c231aed1d32c, a local exception while opening Session history can reject open() without publishing an error state. The UI can remain at Loading history… instead of offering an observable error/retry. This includes initial snapshot application faults and history-stream construction faults; marked Remote failures already have separate handling.
An intermittent Firefox report motivated the investigation. The error-state defect was independently reproduced with a deterministic test. I am not claiming that the original intermittent episode has been reconstructed or that this patch fixes every underlying history/serialization fault. No HAR, credentials, conversation contents or saved Session data are included.
Deterministic reproduction
In the existing Session Client test fixture:
Make session.eventSource.replace() throw a known local Error while applying the initial history snapshot.
Call session.open() and observe rejection with that original error.
On the unpatched implementation, the snapshot still reports openState: 'loading' and openError: null.
Expected: publish a retryable error state, retain the original exception/cause for diagnosis, and permit a subsequent open() to succeed after the local fault is removed.
The patch is one commit ahead and zero commits behind the checked upstream master. It:
catches construction and snapshot-publication faults and publishes openState: 'error' with a gateway/internal Remote error;
preserves the original local rejection and cause, existing Remote failure codes, and stale-generation suppression;
adds history-opening diagnostics and actual local mux-cancellation diagnostics without request/frame payloads; consumed Host terminal frames remain silent;
preserves upstream history paging options and uplink cleanup, and updates both package README languages and pairing records.
No persistence format, saved conversations, model configuration, dependency manifest or distribution-only change is included. Upstream already contains the local-engine native-constructor comparison that addresses the independent Firefox JSON-validator problem; that change is not part of this patch.
All 43 doc-sync checks passed, none failed or skipped.
Normal commit/push checks passed. The staged linter reports one unchanged unused-suppression warning in the Gateway implementation.
Independent read-only review found no lifecycle, stale-generation, cleanup, diagnostic-payload or persistence blockers.
A locally deployed 8Hats backport opened/reloaded existing histories in Chromium and Firefox; the user reported no recurrence during an initial day of use. That is not a completed independently monitored multi-day trial, and those browser observations concern the deployed backport rather than a browser launch of this current-master checkout.
I would welcome maintainer feedback on the recovery behavior and diagnostics. The tested patch is available for review or inclusion through the project's preferred process, and I can submit a PR if external pull requests reopen.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Reporting as Slava (
shofel), a member of 8Hats. Public contact: si@8hats.ai.I am sharing this here because the contribution guide currently directs bug reports to Discussions and says external pull requests are not accepted.
Bug
On upstream master
d743267388641bc76f17c45ce8b4c231aed1d32c, a local exception while opening Session history can rejectopen()without publishing an error state. The UI can remain at Loading history… instead of offering an observable error/retry. This includes initial snapshot application faults and history-stream construction faults; marked Remote failures already have separate handling.An intermittent Firefox report motivated the investigation. The error-state defect was independently reproduced with a deterministic test. I am not claiming that the original intermittent episode has been reconstructed or that this patch fixes every underlying history/serialization fault. No HAR, credentials, conversation contents or saved Session data are included.
Deterministic reproduction
In the existing Session Client test fixture:
session.eventSource.replace()throw a known localErrorwhile applying the initial history snapshot.session.open()and observe rejection with that original error.openState: 'loading'andopenError: null.Expected: publish a retryable error state, retain the original exception/cause for diagnosis, and permit a subsequent
open()to succeed after the local fault is removed.Validated patch
24511d66ee82477a85e2da9dfc2ffff7d5ff335aThe patch is one commit ahead and zero commits behind the checked upstream master. It:
openState: 'error'with agateway/internalRemote error;No persistence format, saved conversations, model configuration, dependency manifest or distribution-only change is included. Upstream already contains the local-engine native-constructor comparison that addresses the independent Firefox JSON-validator problem; that change is not part of this patch.
Checks on this upstream port
pnpm run typecheckpassed, including the Host build and generated Remote declarations.git diff --checkpassed.doc-syncchecks passed, none failed or skipped.A locally deployed 8Hats backport opened/reloaded existing histories in Chromium and Firefox; the user reported no recurrence during an initial day of use. That is not a completed independently monitored multi-day trial, and those browser observations concern the deployed backport rather than a browser launch of this current-master checkout.
I would welcome maintainer feedback on the recovery behavior and diagnostics. The tested patch is available for review or inclusion through the project's preferred process, and I can submit a PR if external pull requests reopen.
All reactions