Altinity / Altinity/altinity-sql-browser

refactor(dashboard): drop the vestigial DashboardApp.prefs field left by #586

Aperta
#595 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

inbox refactor
Lingua principale
TypeScript
Stelle
8
Fork
2
Merge medio
1h 34m
PR unite (30g)
6

Descrizione

Surfaced while shipping #586 (phase 1 of #593). Deferred rather than folded in, because
removing it is a DashboardApp-shape change with no bearing on #586's acceptance criteria.

What

src/ui/dashboard.ts:240 declares:

prefs: Pick<AppPreferences, 'save'>;

on the DashboardApp-shaped interface. Its only real justification was the cell-detail
drawer's resize persistence: openCellDetailattachDrawerResize used to read
state.cellDrawerPx + prefs.save.

After #586 that path is gone. Cell detail from Dashboard always docks into the shell-owned
inspectorHost, and resize is owned by app-shell.ts writing the single rightInspectorPx
preference (one canonical write, src/ui/splitters.ts:140). So prefs.save is no longer
exercised through that call.

#586 updated the field's doc comment in place to say exactly this and deliberately kept the
field, so a future narrower caller gets a compile-time signal instead of a runtime crash. That
was the right call for a refactor phase whose contract said nothing about it — but the field is
now vestigial, and a comment explaining why a field is unused is a weaker guarantee than not
having the field.

Why deferred

Dropping it changes the DashboardApp structural shape and touches every construction site
plus the as ResultsApp cast next to it. That is decomposition work, not shell-primitive work.

Suggested home

Phase 5 of #593 (#589 — extract the dashboard tile gesture controller and a pure repaint
plan) already rewrites this file's seams and is the natural place to drop it. Phase 4 (#588,
composition-root decomposition) is the alternative if the field turns out to be load-bearing for
staged construction.

Not urgent, no user-visible effect, no correctness risk today.

Acceptance

  • prefs is removed from src/ui/dashboard.ts's DashboardApp interface, or a comment
    records a current reason it must stay that does not rest on the deleted
    attachDrawerResize path.
  • npm test, npm run check:types, npm run check:arch pass.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da src/ui/dashboard.ts:240 e traccia ogni punto in cui viene costruito DashboardApp, incluso il cast adiacente as ResultsApp. Verifica se la costruzione per fasi o i punti di integrazione interessati da #589 e #588 richiedono ancora prefs; quindi esegui npm test, npm run check:types e npm run check:arch per confermare che il campo sia stato rimosso o che esista una giustificazione attuale per mantenerlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
frontend
Tipo di issue
Refactoring
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.