Web: dead API-client functions, stale PWA config, and a centralized requestJson helper for client.ts
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 50/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript, vite
- 领域
- build-system, frontend
调研方向
Start in api/client.ts to see the 25 fetch wrappers and dead functions at the listed lines. Read vite.config.ts for the broken PWA asset refs and App.tsx/StatusBar.tsx for vestigial state. Create a requestJson helper and route all calls through it, delete or wire dead code, import types from api/types.ts, and replace any catches. Done when no raw fetch remains, manifest icons exist, and TypeScript shows zero any.
由索引模型根据 Issue 内容生成。
描述
Dead code (zero callers)
launchWithArgs—api/client.ts:222-230. The "Launch with arguments" flow routes throughhandleLaunch; either wire it up or delete (the/api/actions/launch-with-argsendpoint is likewise unused by the UI).fetchWorkflowSession—client.ts:320-324. The runner modal is purely request-driven; if the backend hangs, the modal shows "Step in progress…" forever with no buttons for statusrunning(WorkflowRunnerModal.tsx:460-521). Either delete it or use it to poll running sessions (which would also give hang recovery — complements #24).- Vestigial language state —
StatusBar.tsx:140-166toggle +App.tsx:93, 1440-1441changes nothing (see the i18n issue). vite.config.ts:25-48— PWA config referencespublic/favicon.ico,robots.txt,/icon-192.png,/icon-512.pngthat don't exist (public/has only favicon.svg), so the manifest ships broken icon refs; a service worker inside a localhost webview only causes the stale-asset problems web/README documents. DropVitePWAfrom the webview build or fix the assets. The@alias (:50-54) is unused.
client.ts hardening (25 near-identical fetch wrappers)
- Only 3 of 25 functions extract FastAPI's
detail(loadConfigContent,reloadConfig,startWorkflowSession); the rest throw generic strings and hide the server's reason. - Unguarded
res.json()everywhere — a proxy 502 HTML page surfaces as "Unexpected token '<'…". - No timeouts/AbortController on non-scan calls — a hung backend leaves e.g. hash computation silent after the toast expires and the workflow modal stuck.
Fix: one requestJson helper (method/headers/ok-check/detail extraction/AbortSignal.timeout) that all 25 delegate to.
- Raw
fetchbypasses the client:handleClearFile(App.tsx:892-904, discards serverdetail),DirectoryPickerModal.tsx:63(duplicatesclient.browseDirectory).
Type hygiene
- 38
anyoccurrences (33 arecatch (err: any)) →err instanceof Error ? err.message : String(err)helper. DirectoryPickerModal.tsx:13-23redefinesBrowseEntry/BrowseResultalready exported fromapi/types.ts— import instead.client.ts:251-263generateBarcodekeeps afilePath/file_pathcompat shim; all callers passfilePath— drop the shim.
- 主要语言
- Python
- 星标
- 1
- 派生
- 1
- 平均合并
- 4 小时 46 分钟
- 30 天内合并 PR
- 55
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
falbany/ProFiles 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
falbany/ProFiles#187 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
ip-tools/patzilla#219 · 2 条评论 ·
维护者通常 1 天内回复
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushes未关闭priority:p3 technical-debt
难度 2/5 1-3 小时 新手友好度 82/100
jimmy058910/jmo-security-repo#1673 ·
维护者通常 1 天内回复
-
enhancement ready
难度 2/5 1-3 小时 新手友好度 86/100
-
integration: frontier_silicon
难度 2/5 1-3 小时 新手友好度 70/100
home-assistant/core#193176 · 2 条评论 ·
维护者通常 1 天内回复
-
task create and task update take --body-file and --stdin可能已有人在做 @JuanBarriosS 今天认领。 未关闭cli enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 92/100
pyrite-wiki/pyrite#1687 · 1 条评论 ·
维护者通常 1 天内回复