Web UI: dead code — unused /api/scan/events SSE endpoint, "@" alias, unused npm deps, dead CSS classes, unused weight prop

未关闭
#143 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
57/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, react, typescript, vite

调研方向

Start with the listed locations: server/routes/scan.py, api/types.ts, vite.config.ts, tsconfig.json, package.json, BarcodeModal.tsx, index.css, and FileListTable.tsx. Check each reported unused endpoint, alias, dependency, CSS class, and prop against the references noted in the issue, and inspect the live-scan-progress idea before deciding whether the SSE endpoint is still needed. Done means removing or resolving the listed dead code and correcting the weight seed, with no remaining unused references.

由索引模型根据 Issue 内容生成。

描述

code-quality frontend

Dead code found in the web layer + server surface (verified by exhaustive grep)

  1. GET /api/scan/events SSE endpoint (server/routes/scan.py:175-194) streams scan status every second — no client code subscribes (no EventSource anywhere in web/src), and ScanResultsResponse.in_progress (api/types.ts:122) is never read. Either dead server surface or an unfinished feature — see the live-scan-progress feature idea; remove it if that feature is rejected.

  2. Unused @ path alias — vite.config.ts:50-54 and tsconfig.json:18-21 define "@" → src, but zero from "@/ imports exist (all imports are relative). Delete both blocks or adopt the alias consistently.

  3. Unused runtime dependencies — @tanstack/react-table (package.json:15), clsx (line 16), tailwind-merge (line 24) have zero imports under web/src (FileListTable implements its own table). They inflate npm ci in every packaging build. npm uninstall them; note for the future deptry scope (#43 covers Python only).

  4. Dead CSS class references — BarcodeModal.tsx:246 uses custom-scrollbar and :248 uses slide-in; neither is defined in index.css (grep over all .tsx/.ts/.css), and themed scrollbars already apply globally via * (index.css:321-340). Delete both (or implement .slide-in if the entrance animation was intended).

  5. ScrollableStickyHeaderItem.weight set but never read — interface field + value at FileListTable.tsx:9/:481; the header renders gridTemplateColumns from columnTemplate only. Related inconsistency at :277: reduce(..., 1) seeds a phantom +1 weight so computed defaultWidths don't sum to the available width (the grid's own fr template is correct). Remove the field and seed 0.

主要语言
Python
星标
1
派生
1
平均合并
4 小时 46 分钟
30 天内合并 PR
55

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

falbany/ProFiles 的其他 Issue

查看 falbany/ProFiles 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。