planner docs for import/export data functionality - #882
Conversation
- Introduced a comprehensive feature overview, tasklist and proposed architecture document detailing the workflows for exporting and importing data in the DocumentDB VS Code extension.
There was a problem hiding this comment.
Pull request overview
Adds planning and architecture documentation for upcoming CSV/Excel import/export features in the DocumentDB VS Code extension, covering scope, UX flow, task breakdown, and edge-case expectations.
Changes:
- Introduces a high-level scope/contract summary for import/export behavior (field contracts, preview, error policies, adapters).
- Adds contextual docs: feature workflow overview, architecture/control-flow diagrams, and a detailed phased build plan.
- Adds an initial progress tracker for executing the plan.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/ai-and-plans/PRs/___-import-export/summary.md | High-level scope and design direction for import/export (fixed contract, preview, adapters). |
| docs/ai-and-plans/import-export-data/context/progress-tracker.md | Progress tracking scaffold for executing the work in phases. |
| docs/ai-and-plans/import-export-data/context/feature-overview.md | User workflow narrative for export/import (collection/database flows). |
| docs/ai-and-plans/import-export-data/context/build-plan.md | Detailed phased task plan (UI-first, scaffolding, logic, tests, Atlas follow-ups). |
| docs/ai-and-plans/import-export-data/context/architecture.md | Architecture overview, control-flow diagrams, and normative edge-case/failure-mode catalog. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ``` | ||
| src/webviews/import-export | ||
| └── exportData/ | ||
| ├── ExportData.tsx # Root component | ||
| ├── exportData.scss | ||
| ├── exportDataContext.ts # Context + state types | ||
| ├── exportDataController.ts # WebviewController subclass | ||
| ├── exportDataRouter.ts # tRPC router | ||
| ├── components/ | ||
| ├── hooks/ | ||
| ├── types/ | ||
| └── utils/ | ||
|
|
||
| src/webviews/import-export | ||
| └── importData/ | ||
| ├── ImportData.tsx | ||
| ├── importData.scss | ||
| ├── importDataContext.ts | ||
| ├── importDataController.ts | ||
| ├── importDataRouter.ts | ||
| ├── components/ | ||
| ├── hooks/ | ||
| ├── types/ | ||
| └── utils/ | ||
| ``` |
| - [ ] 04 — Scaffold `src/webviews/exportData/` folder with empty files: `ExportData.tsx`, `exportData.scss`, `exportDataContext.ts`, `exportDataController.ts`, `exportDataRouter.ts`, `components/`, `hooks/`, `types/`, `utils/` | ||
|
|
||
| Create the empty file tree so every later task has a known home for its code. | ||
|
|
||
| ``` | ||
| src/webviews/exportData/ | ||
| ├── ExportData.tsx ← root React component | ||
| ├── exportData.scss ← scoped styles | ||
| ├── exportDataContext.ts ← React context + provider | ||
| ├── exportDataController.ts ← VS Code side (opens panel, owns router) | ||
| ├── exportDataRouter.ts ← tRPC router definition | ||
| ├── components/ ← FieldListPanel, PreviewTable, ProgressPanel … | ||
| ├── hooks/ ← useExportSchema, useExportTask … | ||
| ├── types/ ← ExportConfig, ExportState … | ||
| └── utils/ ← flatPropertyExtractor, columnNameBuilder … | ||
| ``` |
| ### 1. Analyze Collection | ||
|
|
||
| 1. Server retrieves all documents from the selected collection. | ||
| 2. Server analyzes the documents to: |
There was a problem hiding this comment.
BChoudhury-ms Yes, this is what was surprising, please revisit. Take a look at our schema scanner feature that's already in our codebase. Could you also explore what sampling we can get maybe with an aggregation pipeline to go beyond the selected doc, or maybe feed the schema scanner with a random sample of docs - that'd be even better as our schema scanner offers more stats.
Please update the plan to include these discoveries.
✅ Code Quality Checks
This comment is updated automatically on each push. |
📦 Build Size Report
Download artifact · updated automatically on each push. |
|
|
||
| **Example** | ||
|
|
||
| Default (Flattened): |
There was a problem hiding this comment.
BChoudhury-ms rethink whether this should be the default, this might make it hard to import such data back, plus we'd be loosing the original field name 'capitalization'.
I'm not sure whether this option should be offered at all, please spend some time thinking about these scenarios.
|
BChoudhury-ms Please ensure that our default settings for the export allow an import with default settings and the result is well.. identical as far as possible. People might use this method to move data around so if it's destructive, the user should be warned about it, or we should make it non-destructive. |
|
BChoudhury-ms Please ensure that we're using the task service we have in our code base to run the actual import/export task. This will make it easier for us to reuse the import/export implementation in other environments. |
Introduced a comprehensive feature overview, task list and proposed architecture document detailing the workflows for exporting and importing data in the DocumentDB VS Code extension.