Skip to content

Switch CSV table and text in one editor tab - #120

Closed
jonaraphael wants to merge 7 commits into
codex/fix-editor-navigationfrom
codex/switch-table-text
Closed

jonaraphael wants to merge 7 commits into
codex/fix-editor-navigationfrom
codex/switch-table-text

Conversation

@jonaraphael

@jonaraphael jonaraphael commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

The table/text action now appears for supported CSV/TSV/TAB/PSV text files and replaces the current representation in its editor group. The target resolves before replacement, live cell drafts commit first, and unsaved document edits remain unsaved. Existing counterparts are reused; unrelated tabs/groups and tables already owned by another group are preserved.

Choosing Text for a saved local file also records a reversible, literal file-path editor association. Find in Files then opens that file directly in text while CSV stays enabled, preserving its destination instead of creating another CSV table. The choice survives normal window restart and Off/On. Returning successfully to Table restores only the owned file binding. An unqualified native open checks that the association actually wins; failed or stale switches conditionally restore their owned changes. User edits and other editor preferences are preserved. No new contributed setting or UI control.

Stacked on #110, which supplies the shared routing manager and inherits #109's edit-integrity work. The parent lifecycle and saved-file draft protocol are integrated: disable joins an existing commit round or requests a fresh one before native handoff; failed edits keep their DOM draft for retry or Escape; early disposal/cancellation, same-group native reuse and remote media URIs remain intact. Native tab events determine successful replacement before routing ownership is released.

The extension minimum remains VS Code 1.70. This action requires the native reopen command in 1.100+ for clean files and shared dirty-working-copy replacement in 1.120+ for unsaved files. Older hosts retain the current view with update guidance. Untitled ownership is covered by dependent #122.

Validation:

  • Node 20.20.0: compile and 234/234 tests pass; lint 0 errors, 87 existing warnings; diff checks pass. Independent merge review is clear.
  • Actual provider/webview cases cover delayed multiline drafts, failed edits and recovery, stale/fresh acknowledgments, disposal, split groups, disabled-state handoff and re-enable before acknowledgment. Switch tests cover routing rollback, ineffective longer associations and delayed native tab events.
  • Exact PR head 4a7342669d381767f6c70e53ab30f8a4c30892ef: native VS Code 1.142 smoke passes dirty CSV/TSV/TAB/PSV round trips, unchanged disk bytes, one representation, queued multiline edits, counterpart reuse, unrelated tabs/groups and controlled target cancellation preserving the source.
  • Combined 1.4.1 installer: 681 tests and normal installed-host SearchView checks pass first/second/repeated FIND_ME_104 selections, Off/On, same-basename isolation, successful Table restoration and normal window restart. This uses native SearchView commands, not a GUI mouse-click claim.

Boundaries: a file still in Table mode cannot receive the native search range through the stable custom-editor callback; switch it to Text or turn CSV Off first. VS Code matches file patterns case-insensitively and omits URI authority, so unsupported URIs receive guidance instead of a widened preference. Conflicting user associations remain intact. A preexisting late re-enable after native opening has begun can finish in text. A normal installed-host multi-file probe also showed an inactive saved CSV taking the active tab while an untitled source remained intact; the source and committed edits were preserved. These focus sequences remain review limitations. Workbench internal selection/OverlayWebview messages may appear during native replacement while the assertions pass.

Refs #84 and #104. No Windows replication was performed, as requested.

@jonaraphael
jonaraphael changed the base branch from main to codex/fix-edit-integrity October 17, 2026 06:02
@jonaraphael jonaraphael changed the title Add safe switching between CSV table and source text Switch CSV table and text in one editor tab Oct 17, 2026
@jonaraphael
jonaraphael marked this pull request as ready for review October 17, 2026 06:11
@jonaraphael
jonaraphael changed the base branch from codex/fix-edit-integrity to codex/fix-editor-navigation October 17, 2026 19:34
@jonaraphael
jonaraphael deleted the codex/switch-table-text branch October 17, 2026 21:13
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.

Feature request: button to toggle between table view and source text

1 participant