Skip to content

fix(office): align sidebar document lifecycles across editors - #53

Open
lynnlink wants to merge 2 commits into
mainfrom
codex/fix-office-sidebar-bugs
Open

lynnlink wants to merge 2 commits into
mainfrom
codex/fix-office-sidebar-bugs

Conversation

@lynnlink

Copy link
Copy Markdown
Contributor

Reopening an Excel file could create duplicate sidebar tabs and Session file copies, while Word could briefly expose an unfinished renderer on its first open. This change reuses existing documents and brings the Office sidebar lifecycle closer to the PPT workspace pattern.

Changes

  • Reuse unchanged source documents through a shared source-open policy across Word, Excel, and PPT; preserve unsaved edits and report conflicts when a changed source would replace a dirty document.
  • Persist Word and Excel structured Session workspaces through the shared IndexedDB layer, replacing the redundant Excel host recovery transport and reserving Office file writes for explicit Save/Save as actions.
  • Keep native editor instances and undo/redo history with each document when switching tabs.
  • Reveal the Word native surface after renderer readiness and the open request completes, with a themed loading surface during first open.
  • Preserve imported originals when conversion is limited, keep ordinary saves on the acknowledged editable copy, and make Save as and registration retries reuse the intended output.
  • Add regression coverage for document identity, native editor synchronization, recovery, saving, and lifecycle races.

Legacy recovery storage migration is omitted because these Office features have not shipped to users. Previously identified rare concurrency and source-refresh edge cases remain outside this PR's scope.

Validation

  • 349 related regression tests passed; typecheck, lint, and build passed during implementation.
  • The commit hook reran lint and the full desktop typecheck successfully.
  • Manual computer-use testing in the development app: reopening the same Excel file five times and the same Word file three times kept one tab and retained unsaved edits without creating file copies.
  • Verified independent undo/redo across documents, canceled closes, Session switching, Save as, ordinary save, and reopening saved Word/Excel output. A fresh Session's first Word open showed the themed loading surface; no full white flash was observed.
  • Checked PPT creation, note editing, saving, and repeated opening as a baseline. Physical file inspection confirmed that only explicitly saved outputs were created, subsequent saves updated those outputs, and the three original samples remained unchanged.

lynnlink added 2 commits October 10, 2026 20:59
Persist Excel drafts in the Session workspace and reuse canonical source tabs on repeated opens. Gate the first Word native view until settings and editor inventory are ready.

Preserve Save as targets through failed registration and retries, publish early sheet selections, and remove unused legacy recovery paths. Cover the behavior with regression tests.
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