refactor(dashboard): drop the vestigial DashboardApp.prefs field left by #586
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- frontend
调研方向
从 src/ui/dashboard.ts:240 开始,追踪每个 DashboardApp 构造位置,包括相邻的 as ResultsApp 转换。检查分阶段构造或 #589 和 #588 针对的衔接点是否仍然需要 prefs;然后运行 npm test、npm run check:types 和 npm run check:arch,以确认该字段已被移除,或目前仍有合理依据保留它。
由索引模型根据 Issue 内容生成。
描述
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: openCellDetail → attachDrawerResize 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
-
prefsis removed fromsrc/ui/dashboard.ts'sDashboardAppinterface, or a comment
records a current reason it must stay that does not rest on the deleted
attachDrawerResizepath. -
npm test,npm run check:types,npm run check:archpass.
- 主要语言
- TypeScript
- 星标
- 8
- 派生
- 2
- 平均合并
- 1 小时 17 分钟
- 30 天内合并 PR
- 3
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Altinity/altinity-sql-browser 的其他 Issue
-
inbox
难度 2/5 1-3 小时 新手友好度 76/100
Altinity/altinity-sql-browser#605 ·
维护者通常 1 天内回复
-
inbox
难度 2/5 1-3 小时 新手友好度 78/100
Altinity/altinity-sql-browser#509 ·
维护者通常 1 天内回复
-
inbox
难度 2/5 1-3 小时 新手友好度 78/100
Altinity/altinity-sql-browser#489 ·
维护者通常 1 天内回复
-
flamegraph未关闭enhancement
难度 5/5 一周以上 新手友好度 25/100
Altinity/altinity-sql-browser#684 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 68/100
Altinity/altinity-sql-browser#680 · 2 条评论 ·
维护者通常 1 天内回复
查看 Altinity/altinity-sql-browser 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
modelcontextprotocol/ext-skills#156 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
MystenLabs/MemWal#1104 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
Effect-TS/effect#8728 · 1 条评论 ·
维护者通常 1 天内回复
-
account-pool bug
难度 2/5 1-3 小时 新手友好度 76/100
lidge-jun/opencodex#6571 · 1 条评论 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复