Repository navigation
Description
Stage 1 — Reliable appearance and controls
Synopsis
The table-toolbar placement picker reportedly requires the same choice twice before the toolbar moves. Reproduce the failure and correct the setting/message or interaction state responsible for it.
End goal
One deliberate selection changes the toolbar placement and persists the choice while retaining the intended table and cell.
Start after
No prerequisite issue. This work can start independently from freshly fetched origin/main; stage numbering does not require waiting for every earlier milestone. Use the repository's dedicated feature-branch/worktree workflow and record the actual base revision.
Current evidence
This is a reported native-host failure, not a confirmed root-cause diagnosis. The host currently updates configuration and sends a value read from the earlier configuration object, while a separate configuration-change listener also sends updates. That is a candidate message-ordering/stale-value path. The browser test bridge immediately echoes the selected value, so an existing browser pass cannot establish native correctness. Original installed-build and environment details are unknown.
Source-inspected baseline: 19b276f3b819b9549e3a9e06d2dc967d8187ec06. Recheck the relevant code on the actual implementation base. No current runtime pass or implementation completion is claimed by this issue.
Agreed scope
- Support both VS Code and Electron using the existing placement values and defaults.
- Keep a workspace preference at workspace scope when present; otherwise preserve the documented user-preference behavior.
- Do not replace the entire editor merely to apply a placement preference.
Acceptance criteria
- Selecting each supported placement once changes the effective preference and visible placement without a second choice or unrelated focus action.
- The choice persists after reopening the editor and is reflected by the setting and picker; competing or stale acknowledgements do not revert it.
- Rapid consecutive choices finish on the last selected value and handle persistence failures without silently claiming success.
- The selected table/cell, caret, Markdown, document clean state, and undo history are preserved.
- A regression reproduces the real asynchronous host path rather than relying only on an immediate mock echo.
Verification
- Record a reproduction using a synthetic table, the chosen old/new placement, toolbar mode, and installed build identity.
- Exercise the picker in a packaged VS Code extension, including user/workspace settings; exercise the Electron preference path.
- Cover focus/hover retention and changes between floating and top-bar placements; verify an action still targets the retained cell.
Source pointers
src/editorProvider.tssrc/webview/table-toolbar.jssrc/shared/vscode-host-bridge.jssrc/shared/test-host-bridge.jselectron/src/settings-manager.tstest/specs/table-toolbar-placement.spec.ts
Delivery contract
Implement the shared editor behavior in both VS Code and Electron. View-only settings/actions must preserve Markdown, selection/editing context, clean state, and undo history. For new or changed settings, keep host wiring, manifest descriptions, all supported translations, and documentation consistent. Preserve existing identifiers and defaults except for the deliberate changes specified above.
Work from the repository root using the Node version in .node-version and the maintained instructions in CONTRIBUTING.md, docs/building.md, and docs/testing/README.md; export changes also follow docs/export-verification.md. Run full compilation after webview JavaScript/CSS, shared-module, or translation changes, plus checks that exercise the changed behavior. Rebuild and reinstall for installed-extension evidence. Report failures/skips honestly; follow required CI and review gates. Update affected documentation and review any committed Markdown in source and rendered form.
Link the PR or investigation to this issue. Keep remediation on the same focused work item where practical. Completion requires the stated evidence and accepted outcome; opening a draft PR does not complete the issue. No deadline or assignee is imposed by this issue.
Activity