Skip to content

Show projected fields and copy full cell values in Table View - #1171

Merged
Tomasz Naumowicz (tnaum-ms) merged 8 commits into
mainfrom
copilot/grid-show-projected-fields
Dec 3, 2026
Merged

Tomasz Naumowicz (tnaum-ms) merged 8 commits into
mainfrom
copilot/grid-show-projected-fields

Conversation

@tnaum-ms

@tnaum-ms Tomasz Naumowicz (tnaum-ms) commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Table View now respects the executed projection, and both Table and Tree let you copy exactly the cell or label you need without switching to JSON View.

  • Projected columns. Selected fields remain visible as Table headers even when a field is missing from every row or the result page is empty. Fields actually returned on the current page also appear, and _id: 0 is honored. For example, { name: 1, email: 1, _id: 0 } keeps the name and email headers without _id. Clearing the projection restores normal column discovery without resetting the shared completion schema.
  • Copy values and labels. Ctrl+C / Cmd+C copies the focused cell. Headers copy the exact column name, even on empty pages; Tree Field and Type cells copy their displayed labels. Table data and Tree Value cells copy the full returned value as a Shell Literal by default. A collapsed container copies all its contents, and a Tree root Value copies the whole returned document. A string and an ObjectId with the same visible text copy differently. Missing and stale values leave the clipboard unchanged; actual null and empty strings remain distinct.
  • Native context menus. Right-click targets the clicked cell regardless of focus or row selection. Shift+F10 and the Context Menu key open the menu for the focused cell or header. Value cells offer Copy Cell Value and Copy As with Shell Literal, Display Text, and Extended JSON (Canonical). Labels have their own Copy Column Name, Copy Field Name, or Copy Type Name action; header resize actions are unchanged. Menus restore prior grid focus when VS Code returns focus to the page body. Alt+Shift+C / Option+Shift+C remains an alias for default value copy.

Copy is single-target, not a row or range export. Range selection and range-aware menus are tracked separately in #1158 and #1174. It uses cached results without refetching or requiring _id. Canonical Extended JSON preserves the BSON types available from the driver, not numeric subtypes already promoted by it. Monaco and JSON View keep their existing Copy behavior.

Validation: Case 1 build and 372 affected tests passed. Case 2 formatting, localization check, lint, build, strict workspace test typecheck, full runtime suite (11,270 passed, 8 skipped), and VSIX packaging passed. Automated coverage exercises keyboard menu dispatch, body-targeted Copy, and focus restoration. Manual VS Code verification of Shift+F10, Copy As, and focus return remains outstanding.

User manual · Data-grid design

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@tnaum-ms Tomasz Naumowicz (tnaum-ms) changed the title [WIP] Show projected fields and enable copying cell values in Table view Show projected fields and copy full cell values in Table View Dec 2, 2026
Merge projection header hints with returned fields without adding synthetic rows or affecting the shared schema. Document the table shaper parameters and cover missing and empty results.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve projection header hints and full-value cell copy alongside main's connection lifecycle, column sizing menus, and Collection View layout changes. Update merged session fixtures and cover full-value copy wiring after navigation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ CI passed: standard tier (ready PR)

Commit 933ea3a, workflow run.

Layer Result Ran or skipped because
Static checks ✅ passed every push
Unit tests ✅ passed every push
npm packages: verify tarballs ⏭️ skipped no change to packages/**, package-lock.json or the CI workflow
VSIX: inspect contents ✅ passed ready PR
VSIX: self-test of the checks ✅ passed build/verification/**, build/vite/**, the Vite configs, package-lock.json or the CI workflow changed
VSIX: activate in VS Code ✅ passed ready PR
VSIX: self-test of the activation check ✅ passed build/verification/**, build/vite/**, the Vite configs, package-lock.json or the CI workflow changed
Webview host in unbundled extensions ⏭️ skipped no change to packages/vscode-ext-webview/**, package-lock.json or the CI workflow
E2E ⏭️ not available yet arrives with the E2E iteration (full tier)

Full run: add the ci:full-requested label to run every layer once on the current commit.
No full run yet.

Code quality

Check Status How to fix
Localization (l10n) ✅ Passed Nothing to fix
ESLint ✅ Passed Nothing to fix
Prettier formatting ✅ Passed Nothing to fix

PR change stats

Area Files changed Lines added Lines removed Net lines
Production code 18 1,011 232 +779
Tests and fixtures 6 641 250 +391
Other Markdown 1 18 0 +18
Planning and review notes 3 85 22 +63
Generated files and lockfiles 0 0 0 0
Other files 4 141 5 +136

Whole PR since the merge base. Net is added minus removed. Moves between areas count in both.

Review hotspots: most changed code and test files
  • src/documentdb/ClusterSession.test.ts: +363 / -0
  • src/documentdb/ClusterSession.ts: +199 / -28
  • src/webviews/documentdb/collectionView/components/resultsTab/DataViewPanelTable.test.tsx: +51 / -128
  • src/webviews/documentdb/collectionView/components/resultsTab/DataViewPanelTree.tsx: +93 / -71
  • src/utils/documentGrid/formatGridValue.ts: +135 / -0

Build size

Sizes that changed by 5% or 50 KiB or more against main (warning only):

Graph PR Base Delta Delta %
Activation (mainStartup) 3.2 MiB 3.1 MiB ⚠️ ⬆️ +130.5 KiB +4.1%
Extension host (main) 9.5 MiB 9.4 MiB ⚠️ ⬆️ +130.5 KiB +1.4%
  • Activation (mainStartup), biggest package changes (approx., before minification): acorn +169.6 KiB, acorn-walk 8.5 KiB (entered top 60), src/documentdb +6.7 KiB
  • Extension host (main), biggest package changes (approx., before minification): acorn +169.6 KiB, src/documentdb +6.7 KiB, src/utils +6.2 KiB

Only each graph's 60 largest packages are tracked; the rest are counted as (other), so "entered/left top 60" can mean a package crossed that line, not that it was added or removed.

To find out why, compare the chunks (bytes, moduleIds) in host.json and views.json from Bundle-reports-47207090127 with the same reports from a main build.

Artifacts: VSIX | Bundle-reports-47207090127 | L1-manifest-report-47207090127

All graphs (exact bytes)
Graph PR bytes Base bytes Delta bytes Delta %
Collection View page (collectionView) 5,042,418 5,039,376 ⬆️ +3,042 +0.1%
Document View page (documentView) 4,480,763 4,480,708 ⬆️ +55 +0.0%
Local Quick Start page (localQuickStart) 1,245,672 1,245,672 ✅ 0 0.0%
Atlas Credentials page (atlasCredentials) 1,174,335 1,174,335 ✅ 0 0.0%
Cluster Dashboard page (clusterDashboard) 1,224,700 1,224,700 ✅ 0 0.0%
Diagnose Connection page (connectionDiagnostics) 1,197,250 1,197,250 ✅ 0 0.0%
Activation (mainStartup) 3,393,667 3,259,993 ⬆️ +133,674 +4.1%
Extension host (main) 9,970,981 9,837,307 ⬆️ +133,674 +1.4%
Playground worker (playgroundWorker) 5,417,400 5,417,400 ✅ 0 0.0%
VSIX (vsix) 9,111,842 9,070,863 ⬆️ +40,979 +0.5%
playgroundTsPlugin 6,175 6,175 ✅ 0 0.0%
viewsEntry 1,121,768 1,121,768 ✅ 0 0.0%
viewsAssets 80,340 80,340 ✅ 0 0.0%
editorWorker 259,570 259,570 ✅ 0 0.0%
jsonWorker 389,427 389,427 ✅ 0 0.0%

Packaged bytes. Shared chunks count in every graph that loads them, so rows do not add up.

Updated in place on every run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) merged commit c3f9afa into main Dec 3, 2026
24 of 28 checks passed
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) deleted the copilot/grid-show-projected-fields branch December 3, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

3 participants