Revisit: getMongoClient() JSDoc is misleading; only used by main thread scanCollectionSchema
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- documentation
Research direction
Start in src/documentdb/ClustersClient.ts and inspect the getMongoClient() JSDoc, then read its only named caller, src/commands/playground/scanCollectionSchema.ts. Update the documentation to describe the extension-host schema scan accurately and assess whether the suggested narrower API is needed; done means the JSDoc matches actual usage and any API-scope decision is recorded.
Written by the indexing model from the issue text.
Description
Context
ClustersClient.getMongoClient() has a JSDoc that says:
Used by the query playground evaluator to create a @mongosh ServiceProvider that reuses the existing, authenticated connection.
In practice the playground worker has its own MongoClient (different Node worker_thread, separate V8 isolate). The only caller of getMongoClient() is src/commands/playground/scanCollectionSchema.ts which runs in the extension host (main thread). The JSDoc is misleading.
Suggested solutions
- Update the JSDoc to reflect the real caller: schema scan from the extension host.
- Consider whether exposing the raw
MongoClientis necessary at all, or whether a narrower API onClustersClient(for examplegetCollection(db, coll)) would be safer to expose.
Definition of done
- JSDoc accurately reflects the caller.
- Optional: scope of the public API surface is reduced.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-documentdb
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/vscode-documentdb#885 ·
-
bug-bash
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-documentdb#875 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/vscode-documentdb#831 · 1 comment ·
-
user feedback
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-documentdb#535 · 1 comment · 2 reactions ·
-
enhancement needs-triage
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/vscode-documentdb#931 ·
All issues in microsoft/vscode-documentdb
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·