refactor: extract Monaco setup and completion providers from QueryEditor
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- react, typescript
- Ambito
- desktop, developer-experience
Direzione di ricerca
Start with src/components/editor/QueryEditor.tsx and locate the Monaco setup, JOIN and schema completion providers, intention actions, and live-template expansion. Read the existing editor lifecycle and useLiveTemplates usage before deciding how their dependencies are registered and disposed. The requested files are monacoSetup.ts, sqlCompletionProvider.ts, intentionActions.ts, and liveTemplateProvider.ts alongside the component. Done means the component is under roughly 600 lines, the listed features still work, checks pass, and a Vitest test covers pure live-template expansion.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
src/components/editor/QueryEditor.tsx is 1,179 lines. The component itself is fine; the noise is Monaco configuration, language definitions, JOIN suggestion providers, and intention actions inlined alongside the React lifecycle.
What to extract
monacoSetup.ts— theme registration, language token registration, editor option defaults.sqlCompletionProvider.ts— the JOIN-via-foreign-key autocomplete and the schema-aware identifier suggestions.intentionActions.ts— the Alt+Enter "intention actions" (quick fixes / refactors offered in the editor).liveTemplateProvider.ts— the snippet expansion that consumesuseLiveTemplates.
Suggested approach
- Files live in
src/components/editor/next to QueryEditor.tsx. - Each provider is a pure function that takes its dependencies (current schema, FK map, templates) and returns a Monaco-registered disposable.
- QueryEditor.tsx orchestrates the disposables in a single
useEffect.
Done criteria
QueryEditor.tsxdrops below ~600 lines.- All editor features still work: JOIN suggestions, table/column autocomplete, Alt+Enter actions, live templates.
- TypeScript / tests / build green.
- One Vitest test for the live-template expander (pure-string logic).
Out of scope
- Switching to a different editor (CodeMirror, etc.).
- Adding language servers / LSP.
Audit reference
K5 in the pre-launch audit.
- Lingua principale
- TypeScript
- Stelle
- 6
- Fork
- 1
- Merge medio
- 17m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openidle-dev/queryden
-
Multi Query ClusterAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
openidle-dev/queryden#240 ·
-
bug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openidle-dev/queryden#187 ·
-
Refresh database listAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
openidle-dev/queryden#237 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
openidle-dev/queryden#192 ·
-
dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
openidle-dev/queryden#186 ·
Tutte le issue di openidle-dev/queryden
Issue simili
-
Mend: dependency security vulnerability
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
fdm-monster/fdm-monster#5563 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
growilabs/growi#12246 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SSWConsulting/SSW.Rules#2809 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
automated-triage type/bug type/ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno