Skip to content

feat: Tabs panel, example dashboards for showcase deployments, and tab tools for the AI assistant and MCP - #627

Open
emrberk wants to merge 31 commits into
mainfrom
feat/tabs-panel
Open

emrberk wants to merge 31 commits into
mainfrom
feat/tabs-panel

Conversation

@emrberk

@emrberk emrberk commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a Tabs panel, one preview model for closed tabs, a React rewrite of the tab bar, tab management tools for the AI assistant and MCP, and an example-dashboards mode for showcase deployments such as demo.questdb.io.

Companion PR: questdb/mcp-server-questdb#10

Tabs panel

  • A new left-sidebar panel, above Search, with two view modes (segmented Groups | List control under the filter, persisted):
    • Groups (default): folders Notebooks / Editors / Metrics, empty ones hidden. Each folder lists open tabs in tab-bar order; closed tabs are listed after them, newest first, only when Include closed tabs is on (off by default). The AI suggestion diff tab is never listed; a closed tab being previewed always is.
    • List: the tab bar as a list. Open can be reordered (drag, or Alt+↑/↓) and Closed lists history. Example dashboards that are not open are not shown here.
  • Rows: activate, Close, Delete; closed rows: preview, Reopen, Delete. A filter narrows every folder; Close and Delete stay available on filtered rows while other tabs are open. Folders collapse from their header, and the active row is scrolled into view only when it is not visible, so a clicked row stays under the pointer. Header and filter share one PaneHeader frame with the Search and Schema panels.
  • A shared 500 ms guard ignores the second click of a double-click on Close, Reopen and Delete, in the panel and in the history dropdown: the row that slides under the pointer is never acted on. Deleting an open tab compacts positions so a new tab still lands last.
  • Tab history dropdown: each closed tab has its own delete button, and Delete/Backspace on an entry deletes it (a held key deletes one entry only). "Clear history" asks for confirmation and shows the count it opened with. It lists and deletes the same tabs as the Tabs panel, including the one being previewed. A user over the 100-tab limit can free space without clearing the whole history.

Example dashboards (showcase mode)

  • ConsoleConfig.exampleDashboards: { id, title, path }[]. A non-empty list is the single switch for showcase behaviour:
    • the Tabs panel opens first on the first visit, with an Example dashboards folder listed first and the other folders collapsed;
    • the first example auto-opens once per browser on a fresh workspace, prefetched at provider mount so there is no delay before first render;
    • the notebook onboarding modal and the in-notebook MCP promo stay hidden.
  • Example files are plain console exports (typeson $types revived) and go through the same whitelist as an import. Opening an example creates a running notebook tagged with templateId; a second click re-activates it; closing deletes it; renaming (or duplicating) makes it the user's own notebook. A file that cannot be loaded shows a toast. If the user moves to another tab while the file loads, the example opens in the background. Grid cells run automatically; a cell that fails or is refused does not stop the others, and a toast says how many cells did not run.
  • ?templateId=<id> opens (or re-activates) a configured example. Without configured examples the parameter is ignored; an unknown id shows a fixed "not found" toast that does not repeat the link text.
  • Example queries are removed (savedQueries, QueryPicker, "Example queries" menu). The "+" menu now offers New notebook first.
  • The default console-configuration.json ships without examples. The demo's config and dashboard files are added through the BYOC consoleConfiguration block (separate change in questdb/byoc and byoc-prod); the console carries nothing demo-specific.

Schema: "Query" action

A play button next to the info icon on table, view, materialized view and live view rows opens a notebook named after the table with one cell: SELECT * FROM t ORDER BY <designated timestamp> DESC (plain SELECT * without one), editor visible, refreshing every second, rows coloured by side. A second click re-activates the open notebook.

Import

Cells that were showing a result in the exported file run again on import when they are read-only (classified through /sql/validate, with the notebook's DECLARE variables). Cells containing DDL/DML are held and the import toast says so: "Imported 1 tab successfully. 2 cells containing DDL/DML were not run automatically." The runs go through the auto-run gate, so a write can never slip through; a cell that cannot run does not stop the others. Before, an imported grid cell showed its editor only until run by hand, while the charts beside it already polled. These runs, like the automatic runs of example dashboards and Schema "Query" notebooks, are the console's own: the footer does not announce them as "New changes from the agent".

Preview

A single click on a closed tab, in Search or in the Tabs panel, opens it as a read-only preview. Only "Keep open" in the bar above the content, or "Reopen" in the panel, promotes it. "Keep open" puts focus in the editor. Clicks in the editor and double clicks no longer promote it, and the global mousedown listener in Search is removed. While previewing, a transparent layer covers the content of every tab kind: no hover, click, keyboard, or clipboard input reaches it, and the mouse wheel and trackpad still scroll the editor, the notebook, and the result grids. A query sent from outside the editor while previewing (Import "Result", "Create materialized view") opens in a new tab.

Tab bar

ReactChromeTabs (imperative DOM and draggabilly) is replaced by a React TabBar. The markup, class names, and styles stay the same. Drag uses pointer events, with edge auto-scroll. The dropped order shows at once and stays until the database write lands. Reorders from the Tabs panel show in the bar at once. The preview tab stays last and cannot be dragged. Only the primary button activates a tab: a right or middle click leaves the active tab alone, as before. draggabilly is removed.

Next active tab

When the active tab is closed or deleted, the console selects the most recently used open tab (the last 20 are kept), then the left neighbour. It picks from the tabs in IndexedDB, so the editor always opens the latest saved content, including after Alt+W. A reopened tab is placed after the last open tab. The last real tab can no longer be closed while a preview is open.

Agent tools

delete_notebook is replaced by archive_tab, restore_tab, activate_tab, rename_tab and delete_tab. They work on SQL editor, metrics, and notebook tabs. <workspace> lists every tab with its kind and archived state. User close and delete events cover every tab kind. create_notebook and duplicate_notebook return error_code: tab_limit when the limit is reached. The agent cannot close or delete the last open tab, even while a closed tab is previewed. restore_tab on the previewed tab makes it a normal, editable tab. delete_tab requires the user's confirmation: the prompt and the tool description tell the agent to name the tabs, ask, and delete only after the user confirms in a later message. Deletes by the agent, and the removal of an AI suggestion tab, are not reported back as user actions. The tab tools carry a mutatesWorkspace flag: a turn that changed tabs is not replayed after a provider error, and no notebook read is required first.

Other

  • Tab import: rows rejected during an import were visible for a moment to every consumer of buffers, and the Tabs panel crashed on a non-string label. EditorProvider filters them out.
  • SettingsProvider's context lives in its own module, so EditorProvider can read the console config without pulling the components barrel (and Radix) into node-side tests.
  • Schema panel header aligned with the other panels.
  • Example dashboard, Schema "Query" and add-cell flows live in EditorProvider/notebookOpeners.ts. deleteBuffer and archiveBuffer take an options object ({ activateNext, initiator, focus }).

Compatibility: the MCP bridge advertises its own bundled tool list. Bridge 0.5.0 still lists delete_notebook and none of the new tools, so MCP tab management needs the companion PR and a bridge release. EXPECTED_MCP_VERSION will be bumped after that release.

Testing

Branch is merged with main (#621 test layout, #628).

  • yarn test: 3,785 pass (unit, component, integration). New tests cover tab grouping and the list view, the row-action double-click guard (Close, Reopen, Delete), closing a preview with its tab X, the optimistic reorder reset, automatic cell runs that fail or are refused, example links on deployments without examples, an example that loads after the user switched tabs, example dashboard parsing/revival, the fresh-workspace check, the showcase switch for the onboarding modal and MCP promo, the table preview cell, the import run plan (DQL vs DDL/DML), appendQuery placement (ported from the removed Example-queries e2e suite), and the tab tools, next-active-tab selection, tab bar layout, workspace info and user-action digest from the first iteration. Tab activation ignores right and middle clicks, and the console's automatic runs are not announced as agent changes (headless runner, and the importRunPlan.spec.js import flow).
  • tsc --noEmit, ESLint, the color-literal check, and yarn build pass.
  • E2E, local QuestDB, under test/e2e: tabsPanel.spec.js (41: groups, closed tabs, preview, reopen, delete, double-click guard on Close and Delete, double-click in a long list, held Delete in the history, filter, collapse, List mode with drag reorder and reload, example dashboards first visit / auto-open / onboarding modal / rename / broken file / List mode), tabsPanelLifecycle.spec.js, tabRemovalQueue.spec.js, tabActivationDuringScript.spec.js, schemaQueryTable.spec.js, importRunPlan.spec.js, search.spec.js, editor.spec.js (57) all pass.
  • Not run locally: test:e2e:auth and test:e2e:enterprise.

Deploy note

demo.questdb.io gets its console-configuration.json from the BYOC consoleConfiguration block. Showing the examples there needs exampleDashboards in the byoc config struct and the four dashboard files reachable at assets/examples/*.json; savedQueries can be dropped from demo.yaml.

AI assistance

AI assistance was used for implementation, validation, and testing.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Web Console deploy preview

Preview Commit Logs
https://pr-627--web-console.netlify.app 644cec7 build log

…e Tabs panel

- Alt+W no longer reopens an outdated copy of the next tab. The next active
  tab is picked from stored tabs, and editor actions read the latest context,
  so the next keystroke cannot overwrite newer content.
- While a closed tab is previewed, Import "Result", example queries and
  "Create materialized view" open the query in a new tab instead of dropping
  it or running a statement from the previewed tab.
- The agent can no longer close or delete the last open tab while a closed
  tab is previewed, which left a blank console after closing the preview.
- Agent restore_tab on the previewed tab now makes it a normal, editable tab.
- In the Tabs panel, Enter and Space on Close, Delete, Reopen and Delete all
  run the button's own action.
- Delete all and Clear history also delete the previewed tab and switch to
  an open tab. The dialog count matches what is deleted.
- Agent delete_tab and closing an AI suggestion are no longer reported to
  agents as user deletions.
- Tab tools mark the AI turn as not replayable without requiring a notebook
  read first.
- The Tabs panel filter no longer disables Close and Delete.
- Keep open focuses the editor.
- A reopened tab is placed after the last open tab.
- Add unit tests for the bridge tab tools and the new helpers, and a Cypress
  spec for the Tabs panel and the history dropdown.
emrberk added a commit to questdb/mcp-server-questdb that referenced this pull request Nov 9, 2026
…he tab tools

Mirrors questdb/ui#627. The console now marks archive_tab, restore_tab, activate_tab, rename_tab and delete_tab with "mutatesWorkspace": true so a failed AI turn is not replayed after a tab change. The bridge only exposes name, description and inputSchema, so the tool list it advertises is unchanged.
javier
javier previously approved these changes Nov 10, 2026
Tabs panel
- Groups view (default): Notebooks / Editors / Metrics folders, open tabs
  in bar order then closed newest first, "Include closed tabs" off by
  default; the AI diff tab is never listed, a previewed closed tab always is.
- List view: the tab bar as a list with drag / Alt+Arrow reordering, and a
  Closed folder. Mode persisted; segmented Groups | List control under the
  filter, matching the notebook List | Grid toggle.
- Header and filter aligned with the Search and Schema panel frames.
- Shared 500 ms guard against the second click of a double-click on Delete
  (panel rows and the history dropdown); deleting an open tab compacts
  positions so a new tab still lands last.

Example dashboards (ConsoleConfig.exampleDashboards)
- A non-empty list is the single switch for showcase behaviour: Tabs panel
  opens first on the first visit, an "Example dashboards" folder is listed
  first, the first example auto-opens once on a fresh workspace (prefetched
  at provider mount), the notebook onboarding modal and the in-notebook MCP
  promo stay hidden.
- Files are console exports (typeson "$types" revived) validated through
  the import whitelist; an open example reuses its tab, closing deletes it,
  renaming makes it the user's own notebook.
- Example queries (savedQueries, QueryPicker) removed; "+" menu offers
  New notebook first.

Import
- Cells that were showing a result in the source are run again when they
  are read-only; cells with DDL/DML are held through the auto-run gate and
  the import toast says so.

SettingsProvider's context moves to its own module so EditorProvider can
read the console config without pulling the components barrel into
node-side tests.
A play button next to the info icon on table, view, materialized view and
live view rows opens a notebook named after the table with one cell:
SELECT * FROM t ORDER BY <designated timestamp> DESC (plain SELECT without
one), editor visible, refreshing every second, rows coloured by `side`.
A second click re-activates the open notebook instead of creating another.
The suite drove appendQuery through the Example queries picker, which is
gone. appendQuery is still used by "Create materialized view", so the
scenarios (cursor on first/middle/last line, empty or not, multiline
query, semicolon injection) now run against the function with a
model-faithful fake editor.
Takes main's test layout (#621: e2e under test/e2e, integration tests
under test/integration). The e2e specs from this branch move with it;
the appendQuery suite stays removed (Example queries are gone, the
scenarios live in src/scenes/Editor/Monaco/appendQuery.test.ts), and the
search/tabs expectations follow this branch's preview-bar semantics.
Follows the merge: main's integration test still expected the pre-tabs
workspace message (kind: other, notebooks: []); every tab is listed now.
@emrberk emrberk changed the title feat: add a Tabs panel and tab management tools for the AI assistant and MCP feat: Tabs panel, example dashboards for showcase deployments, and tab tools for the AI assistant and MCP Nov 11, 2026
…ab is re-activated

Re-activating the running tab (Tabs panel row, Search result) gave the
editor a new active buffer, and syncReadOnly unlocked it mid-run. Typed
text was saved and the run's line-keyed glyphs and markers shifted.
- Query action: double-quote a designated timestamp that is not a plain
  identifier in ORDER BY; QuestDB reads a single-quoted token as a literal.
- Query action: a notebook named after the table is reused without losing
  its cells. The cell holding the query is focused; without one, the query
  cell is appended, focused and run.
- AI diff tab: always last in the tab bar; no tab can be dragged past it,
  it cannot be dragged, and reorders index the user's tabs only, so the
  Tabs panel and the tab bar agree. It closes even next to a single tab.
- Closing the AI diff tab is no longer reported to agents as a user
  deletion.
- tab_limit hint tells the agent to ask the user before deleting tabs.
- Example auto-open is decided once, on the first load: a visitor with tabs
  never gets it later, and later loads skip the fetch.
- Tab history: Delete/Backspace deletes the focused entry, keeping focus in
  the menu.
- Tabs panel rows: Close/Delete/Reopen sit beside the row's button instead
  of inside it.
- An example notebook archived by an agent becomes a regular closed
  notebook, listed in the Tabs panel.
- The delete e2e test now removes two open tabs and checks positions stay
  contiguous, so it fails without compaction.
Example dashboards
- Show a spinner while a first-time visitor's example is fetched, and
  report a file that cannot be loaded (once) before opening the stored tab.
- Show a spinner on an example row while it loads; a double-click opens
  one copy, not two.
- A notebook whose example is no longer configured becomes a regular
  notebook: listed in Groups view and kept in history when closed.

Schema "Query"
- A double-click creates one notebook.
- Read openTableNotebook through a ref, so a memoized row never positions
  the new tab against a stale tab list.
- Double-quote table and column names that are SQL keywords.
- Keyboard path: Ctrl/Cmd+Enter on the row, Enter/Space on the button, and
  a "Query in a notebook" context menu item. Tooltip placed below, so it no
  longer covers the details button.
- The notebook refreshes on Auto as its default, with no cell override.

Import
- A cell whose validate request fails is held and reported as not checked,
  instead of being reported as DDL/DML.

Focus and accessibility
- Close/Delete in the Tabs panel keeps focus in the panel.
- Enter on a closed search match moves focus to Keep open.
- The editor tab bar is a tablist.

MCP
- get_workspace_state lists SQL and metrics tabs when no notebook exists.

Tests
- EditorProvider component tests for next-tab selection, the preview
  write guard, example dashboards and schema Query de-duplication.
- New e2e coverage for the above; scope notebook result-tab selectors now
  that the tab bar is a tablist.
- Pre-load importTabs in the example dashboard tests to avoid a timeout
  under load.
Agent tools
- Tab tools reject the AI suggestion tab, and <workspace> no longer
  reports it as the active tab.

Tabs panel
- A closed panel renders no lists and does not re-render on every
  editor keystroke.
- Switching between Groups and List no longer carries a collapsed
  section over to the other view.
- Close, Delete and Reopen share one row actions hook. Reopen keeps
  keyboard focus in the panel.
- Section headers show the standard focus ring; row actions are no
  longer dimmed with opacity.

Tab bar and drag
- A drag is cancelled when the tabs change under it, in the tab bar and
  in the panel, so the shown order never diverges from the stored one.
- Unused TabBar props and other dead code are removed.

Focus and accessibility
- Deleting the previewed history entry from the keyboard keeps focus in
  the menu.
- Dismissing Clear history returns focus to the history button.
- Tab and Shift+Tab move past a previewed tab's read-only content.
- Keep open on a notebook or metrics preview focuses its tab.
- The history row's delete button is mouse only, out of the menu's
  accessibility tree.

Positions
- archiveBuffer and deleteBuffer compact open tab positions; callers no
  longer write them a second time.

Tests
- Component tests for the panel, tab bar drag, delete guard in List
  mode, focusPast, preview reopen, position compaction and user action
  events; bridge and workspace tests for the AI suggestion tab.
- e2e: human-paced double-clicks, preview focus and wheel scrolling,
  closed notebook preview, history focus.
- schemaQueryTable sets up its tables through the HTTP API and waits for
  the WAL rows, so a slow run no longer opens "Cancel current query?".
An example dashboard file is a console tab export. Read its database
version and run the rows through migrateBuffer before validating, as the
tab import does, so a future buffers migration reaches example files too.
A file without a database version (a plain array of rows) is rejected:
it cannot be migrated.
emrberk and others added 6 commits November 13, 2026 18:43
Add template links, retain personalized examples, and center the active tab in the side panel. Refresh query timings when result rows stay unchanged and cover automatic-run guards and panel behavior with regression tests.
- Move template-link handling into readExampleLink/planExampleStartup and
  cover every link shape in a unit test; keep one e2e in editor.spec.js
  (replaces notebook-links.spec.js). A non-array exampleDashboards no longer
  crashes the console.
- archive_tab/delete_tab refuse the tab running a script (tabs_locked).
- Tabs panel: only the lists scroll, the filter stays in view.
- In-app chats hear about every tab the user closes or deletes.
- Example files cannot walk $types paths through __proto__.
- A reload during a closed-tab preview no longer leaves a stale active id
  that later saved another tab's text into the previewed one.
- Tab rename selects the title synchronously instead of on the next
  animation frame, so typing replaces it (flaky editor.spec rename test).
…ctable

- Tab history: a held Delete/Backspace deletes one entry, not every entry
  that takes focus while the key repeats.
- Tabs panel: Close and Reopen share the double-click guard with Delete, so
  the second click never acts on the row that slid under the pointer.
- Tabs panel: the active row is revealed with block "nearest", so a clicked
  row does not move away before the second click of a double-click.
- Example links: ?templateId= is ignored without configured examples, and
  the not-found toast no longer repeats the link text.
- An example opened from the Tabs panel opens in the background when the
  user moved to another tab while its file loaded.
- Automatic cell runs (examples, Schema "Query", imports) continue after a
  failed or refused cell and tell the user how many cells did not run.
- Clear history: the dialog keeps the count it opened with.
- delete_tab: the prompt and the tool description require the user's
  confirmation before a delete.
- Structure: notebook openers move out of EditorProvider; deleteBuffer and
  archiveBuffer take an options object; one next-position helper; shared
  RowActions and PaneHeader; typed legacy wheel fields.
- Tests: preview close with X, useOptimisticOrder reset, addBuffer editor
  contract, auto-run failures, row action guard, held Delete, double-click
  in a long list.
emrberk added a commit to questdb/mcp-server-questdb that referenced this pull request Nov 15, 2026
Mirrors questdb/ui#627. The delete_tab description now requires the user's confirmation: the agent names the tabs to delete, asks the user to confirm, and calls delete_tab only after the user confirms in a later message. Otherwise it uses archive_tab.
…utomatic runs to the agent

- Tab bar: a right or middle click on a tab no longer switches to it; only
  the primary button activates a tab, as before the TabBar rewrite.
- Automatic runs the console starts for the user (tab import, example
  dashboards, the Schema "Query" notebook) no longer show "New changes from
  the agent" in the footer. The auto-run gate takes an `initiator: "user"`
  flag, and the headless runner only announces agent runs.
- Tests: TabBar activation by button, headless auto-run announcement by
  initiator, and the import e2e checks that no agent change is announced.
@emrberk

emrberk commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Review: PR #627 — feat: Tabs panel, example dashboards for showcase deployments, and tab tools for the AI assistant and MCP

Reviewing PR #627 at level 3 (full mission-critical pass). Base 83d0b850, head 6af6de7e.

PR title and description

  • The title follows Conventional Commits (feat: …). The description after the type does not start with a verb; prefer feat: add Tabs panel, ….
  • The description is written for end users and is detailed.

Quality checks (head 6af6de7e)

Check Result
yarn typecheck pass
yarn build pass
yarn lint (incl. color check) pass
yarn test pass (230 files, 3,785 tests)

Issues

Issue ID Issue name Category Severity Location Net impact Evidence Description Steps to reproduce Suggested fix
#1 Preview hides Cancel and log Accessibility & UX Moderate in-diff Single-query runners previewing a closed tab lose inline Cancel and log Scratch Cypress spec (rung 5) at 6af6de7e: before the preview Cancel was visible, during the preview button-cancel-query count = 0 and read-only-overlay was topmost over expand-notifications, after Close Cancel was visible again. Base 83d0b850: static, ButtonBar rendered StopButton regardless of isTemporary and there was no overlay. While a single query runs, the tabs stay enabled (tabsDisabled is set only for scripts and share-link validation), so the user can preview a closed tab from the Tabs panel or Search. Monaco/index.tsx now renders ButtonBar only when !activeBuffer.isTemporary, so the editor's Cancel button disappears. The early return in handlePrimaryRun and ReadOnlyGuard both block Ctrl+Enter. ReadOnlyOverlay covers the query log's expand, collapse and clear controls too, even though they are not tab content and can belong to the AI chat. The Query Activity drawer can still cancel, and closing the preview restores Cancel. • Run a long single query in a SQL tab
• Open the Tabs panel and turn on "Include closed tabs"
• Click a closed tab
• The Cancel button is gone and the query-log controls cannot be clicked until Keep open or Close
Keep ButtonBar rendered during a preview and disable only the run buttons, as the base isTemporary prop did. Render Notifications outside ReadOnlyGuard and the overlay. Alternatively, disable closed-tab preview while any query is running, as already happens for scripts.
#2 Example write cells skipped silently Query execution & data integrity Moderate in-diff Showcase visitors, when an example has a DDL/DML grid cell Scratch Vitest (rung 2) at 6af6de7e: the real resolveRunBarrier returned action: "skipped" for a DROP cell; runCellsAutomatically with the matching summary made toast.error 0 calls. Base: N/A, new surface. runCellsAutomatically (notebookOpeners.ts) counts a cell as not run only when summary.denied is set. For the auto-run gate, DDL/DML cells come back as skipped, so they are never counted and no toast appears, contrary to the function's own comment. exampleAutoRunCellIds does not filter write cells out first. The cell stays empty with no explanation. Import (write cells are held and noted) and table notebooks (generated SELECT) are not affected. • Configure exampleDashboards with a file whose grid cell contains INSERT …
• Open the example from the Tabs panel, via ?templateId=, or by first-visit auto-open
• The write cell stays blank with no toast or note
Count summary.skipped !== undefined as not run. Alternatively, plan example runs the way import does and show the same hold note.
#3 First row click swallowed React correctness & hooks Moderate in-diff Tabs panel List view users: one extra click in a narrow sequence Scratch component test (rung 4) at 6af6de7e: after a drag released at y=200 and a re-render with reorderable=false, the first click left onActivate uncalled; the second click activated the row. Base: N/A, new surface. useRowDrag.end() sets droppedRef = true. When the pointer is released outside the rows, the click lands on a common ancestor, so consumeDrop() never clears the flag. Once a filter makes the list non-reorderable (TabLists.tsx:129), startDrag is skipped and nothing resets the flag. The next row click is consumed by consumeDrop() and does nothing. • Open the Tabs panel in List view with an empty filter
• Drag an open row and release it below the list
• Type a filter that still matches rows
• Click a row: it does not activate until clicked again
Clear droppedRef on any pointerdown (also when not reorderable), when reorderable changes, or on the next tick after pointerup.

Adjacent findings (not blocking — file as issues)

Alt+W deletes a tab with content instead of closing it to history

  • Problem: Alt+W deletes a tab with content instead of closing it to history.
  • Net impact: Every user with content in the active tab loses it on Alt+W.
  • Location: src/scenes/Editor/Monaco/editor-addons.ts:117-133 (CLOSE_ACTIVE_TAB calls deleteBuffer)
  • Symptom: The tab's SQL is gone and does not appear in tab history. The tab bar's X archives the same tab instead.
  • Reachability: Focus the editor, then press Alt+W. Base 83d0b850 behaves the same; this PR only adds a refusal when it is the last open tab.
  • Suggested fix: Call closeBuffer (archive when the tab has content) instead of deleteBuffer.
  • Severity if filed standalone: Critical (persisted data lost), unless the hard delete is intended.

Summary

  • Verdict: approve with comments. Please address wip test for error range #1 and init react components package #2. disabled buttons #3 can be a follow-up.

  • Correctness gate: passes. There are no admitted Critical findings. Each finding survived an attempt to disprove it, and each has an executed artifact at 6af6de7e.

  • Test gate: passes. Admitted coverage gaps: 0.

  • Regressions and tradeoffs:

    • wip test for error range #1 is a regression from base: the inline Cancel and the query log are unavailable during a preview.
    • Deliberate tradeoffs, not findings:
      • A previewed tab cannot be selected or copied.
      • Imported notebooks re-run their read-only cells right after import.
      • The AI workspace context now lists every tab label.
  • In-diff / out-of-diff: 3 in-diff, 0 out-of-diff. The cross-context pass walked every outside caller of the changed symbols and found them all safe:

    • the Alt+W action
    • addBuffer callers
    • writes to previewed tabs
    • nested bufferStore.update transactions
    • workspace-info and user-action-digest consumers
    • export

    The change is well contained.

  • Severity distribution: 0 Critical, 3 Moderate, 0 Minor.

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.

2 participants