Skip to content

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

Open

Description

@falbany

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 (deptry: declare hatchling and direct transitive imports (PIL, objc, WebKit) and actually run deptry #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.

Activity

  1. added
    code-quality
    frontend
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-qualityfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions