Skip to content

Docs file opener fails tab sync because fileOpenerOwner is rejected #1773

Closed

Description

@ryanbbrown

Summary

Opening a Markdown workspace file with the Docs editor shows this toast:

Couldn’t sync tabs - unrecognized code: [fileOpenerOwner]

The file still opens and Docs edits save correctly. The failure appears limited to persisted thread-tab state.

Environment

  • bb desktop: 0.38.0
  • Docs plugin: 0.2.2
  • macOS

Steps to reproduce

  1. Enable the Docs plugin as the automatic opener for .md files.
  2. Open a Markdown file from a thread.
  3. Observe that the Docs editor opens.
  4. Observe the tab-sync error toast.

Expected

The Docs tab opens and its tab state syncs without an error.

Actual

The editor opens and saves file changes, but thread-tab sync fails with unrecognized code: [fileOpenerOwner].

Likely cause

The app adds fileOpenerOwner to plugin file-opener tabs, but the strict plugin-panel branch of threadTabSchema in packages/server-contract/src/api/thread-tabs.ts does not accept that field. The app-side schema in apps/app/src/lib/fixed-panel-tabs-state.ts does accept it.

This appears related to #1708.

Activity

  1. added theissue type on Aug 18, 2026
  2. added
    docs
    on Aug 18, 2026
  3. SawyerHood commented on Aug 18, 2026

    @SawyerHood
    Collaborator

    Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1773.html

    • Verdict: REPRODUCED · root-cause confidence: high
    • Root cause (short): Unify plugin app slot resolution and replacement hosts #1708 added fileOpenerOwner to plugin file-opener tabs and to the app-local schema but not to the strict plugin-panel branch of threadTabSchema in packages/server-contract/src/api/thread-tabs.ts; thread-tabs-sync.ts runs threadTabsSchema.parse(tabs) before every PUT, so zod throws unrecognized_keys, no PUT is sent, the "Couldn't sync tabs" toast shows the ZodError JSON, and the thread's tab list (Docs tab included) is never persisted — visible as tab-lost-on-reload once the server row is at revision >= 1 (revision-0 threads keep it locally via the localStorage-migration branch).
    • Proposed fix: Add an optional fileOpenerOwner (discriminated union of workspace-file-preview / host-file-preview / thread-storage-file-preview owner shapes, mirroring apps/app/src/lib/fixed-panel-tabs-state.ts) to the strict plugin-panel branch of threadTabSchema in packages/server-contract/src/api/thread-tabs.ts (diff in 1773/repro/proposed-fix.diff). Re-verified this revision: both repro tests fail on main and pass with the diff; live Diff-panel open on the :15908 instance sends PUT 200, no toast, tab survives reload, server row contains the opener tab (tabs-after-fix.json). Regenerate the committed…
    • Caveats: Verifier findings addressed: (1) the "Unify plugin app slot resolution and replacement hosts #1708 shipped in desktop 0.38.0" claim was wrong — desktop-v0.38.0 = 45145e5 (released 2026-08-15) does not contain 564090d (merged 2026-08-17); reporter is on a post-release main build still versioned 0.38.0; report and git evidence corrected. (2) Path C was re-run in both states: on a fresh thread (server revision 0) the Docs tab appears and survives rel…

    The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at 16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).

    AGENT GENERATED: by Claude Opus 5

  4. added
    confirmed-repro
    on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprodocs

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions