refactor(app): remove dead screen-intelligence UI remnants (#5056) - #5102
Conversation
…sai#5056) Six orphaned modules left over from an earlier screen-intelligence UI, all with zero importers anywhere in the app (verified incl. test/, no barrel re-exports, no dynamic refs): - hooks/useIntelligenceStats.ts - hooks/useIntelligenceApiFallback.ts - hooks/useScreenIntelligenceItems.ts (+ its co-located test) - components/intelligence/SyncConfirmDialog.tsx - components/intelligence/SyncBudgetDialog.tsx The screen-intelligence feature itself stays intact — ScreenIntelligencePanel and its nav/RPC path are live opt-ins, only these unreferenced remnants are removed. svgForceLayout.worker is deliberately NOT removed: it is live via useSvgForceLayout -> MemoryGraph. Verified: pnpm typecheck passes. Rank 1 (dead sub-slice) of the tinyhumansai#5056 cleanup audit. The screen-intelligence, desktop-automation, and local-Whisper *features* are shipped opt-ins, not dead code — see PR discussion for the recommended tinyhumansai#5056 reframe.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (6)
⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
senamakel
left a comment
There was a problem hiding this comment.
Automated technical review: approved for the inspected head commit.
Verification summary:
- Scope: Deletes 6 orphaned modules (624 lines) — 4 hooks (, , , plus its co-located test) and 2 dialog components (, ).
- Zero remaining references: grep-confirmed no imports to any of the 6 deleted files or their exported symbols from anywhere else in .
- Live code correctly preserved: (referenced via ), , nav entry, and RPC path all untouched — the feature stays.
- No barrel/index files affected: No re-exported any of the deleted modules.
- ** module unaffected**: Types (, , etc.) still consumed by living files.
- i18n keys orphaned (non-blocking): and remain in locale files — standard follow-up for a dead-code cleanup PR scoped to UI remnants.
- Author () differs from reviewer ().
- Head OID unchanged from inspection ().
- CI: PR CI Gate PASSED, Frontend Checks (quality, i18n, docs, coverage) PASSED. PR Submission Checklist FAILURE is a soft quality gate whose items were marked N/A by the author — non-blocking for dead-code deletion.
- No unresolved review threads, no requested changes, mergeable.
senamakel
left a comment
There was a problem hiding this comment.
Automated technical review: approved for the inspected head commit.
Verification summary:
- Scope: Deletes 6 orphaned modules (624 lines) — 4 hooks (useIntelligenceStats, useIntelligenceApiFallback, useScreenIntelligenceItems, plus its co-located test) and 2 dialog components (SyncBudgetDialog, SyncConfirmDialog).
- Zero remaining references: grep-confirmed no imports to any of the 6 deleted files or their exported symbols from anywhere else in app/src/.
- Live code correctly preserved: svgForceLayout.worker.ts (referenced via useSvgForceLayout), ScreenIntelligencePanel, nav entry, and RPC path all untouched — the feature stays.
- No barrel/index files affected: No index.ts re-exported any of the deleted modules.
- types/intelligence module unaffected: Types (ActionableItem, ChatMessage, etc.) still consumed by living files.
- i18n keys orphaned (non-blocking): syncBudget.* and syncConfirm.* remain in locale files — standard follow-up for a dead-code cleanup PR scoped to UI remnants.
- Author (graycyrus) differs from reviewer (senamakel).
- Head OID unchanged from inspection (c04892b).
- CI: PR CI Gate PASSED, Frontend Checks (quality, i18n, docs, coverage) PASSED. PR Submission Checklist FAILURE is a soft quality gate whose items were marked N/A by the author — non-blocking for dead-code deletion.
- No unresolved review threads, no requested changes, mergeable.
|
| Filename | Overview |
|---|---|
| app/src/hooks/useIntelligenceStats.ts | Deleted — polling hook with 5s interval that fetched session stats, memory file count, and graph entity counts via Tauri/RPC; zero importers confirmed. |
| app/src/hooks/useIntelligenceApiFallback.ts | Deleted — local-only stubs for actionable-item mutations and task execution; zero importers confirmed. |
| app/src/hooks/useScreenIntelligenceItems.ts | Deleted — hook that mapped vision summaries to ActionableItems; zero importers confirmed. |
| app/src/hooks/tests/useScreenIntelligenceItems.test.ts | Deleted — co-located test for the removed hook; correct to remove alongside the implementation. |
| app/src/components/intelligence/SyncBudgetDialog.tsx | Deleted — modal dialog for editing per-source sync budget; zero importers confirmed. |
| app/src/components/intelligence/SyncConfirmDialog.tsx | Deleted — modal dialog that fetched a cost estimate before triggering a sync; zero importers confirmed. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph deleted["Deleted (dead code — 0 importers)"]
A[useIntelligenceStats.ts]
B[useIntelligenceApiFallback.ts]
C[useScreenIntelligenceItems.ts]
D[useScreenIntelligenceItems.test.ts]
E[SyncBudgetDialog.tsx]
F[SyncConfirmDialog.tsx]
end
subgraph kept["Retained (live features)"]
G[ScreenIntelligencePanel]
H[useSvgForceLayout → MemoryGraph]
I[svgForceLayout.worker.ts]
J[useScreenIntelligenceState]
end
G --> J
H --> I
Reviews (1): Last reviewed commit: "refactor(app): remove dead screen-intell..." | Re-trigger Greptile
Summary
Problem
The #5056 audit flagged screen intelligence, desktop automation, and local Whisper as "features to remove." On inspection all three are shipped, off-by-default opt-in features (screen-intelligence panel + nav are live; voice was rebuilt in #4901 so local Whisper is a working STT option; desktop automation is fully wired to the orchestrator). Deleting them would be product-impacting feature removal on a stale premise — out of scope for dead-code cleanup.
What is genuinely dead is a set of orphaned modules from an earlier screen-intelligence UI that nothing imports anymore.
Solution
Delete (verified 0 importers incl.
test/, no barrel re-exports, no dynamic refs):hooks/useIntelligenceStats.tshooks/useIntelligenceApiFallback.tshooks/useScreenIntelligenceItems.ts(+ co-located__tests__/useScreenIntelligenceItems.test.ts)components/intelligence/SyncConfirmDialog.tsxcomponents/intelligence/SyncBudgetDialog.tsxDeliberately kept:
svgForceLayout.worker.ts— it is live viauseSvgForceLayout→MemoryGraph(the doc-audit mis-flagged it). TheScreenIntelligencePanel, its nav entry, and RPC path are also kept — the feature stays.Reframe recommendation for #5056
The remaining #5056 line items are not dead code and should be reframed rather than deleted:
whisper-rs) is the job of the Add the missing inference gate so whisper-rs and cpal stop linking into every build #5048 inference gate, not a deletion.sha1is a separate PR.Submission Checklist
N/A: dead-code deletion; removed only the co-located test of a deleted hook.pnpm typecheckpasses.N/A: deletion-only diff.N/A: no live feature changed.## RelatedN/A: unreferenced modules only.## Related(does not close Remove unused/redundant features: screen intelligence, order complete, desktop automation, autocomplete, Whisper, unnecessary runtimes #5056).Impact
pnpm typecheckpasses.Related
ScreenIntelligencePanelretainedAI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
fixes/rm-dead-intelligence-remnantsValidation Run
pnpm --filter openhuman-app format:check— N/A / clean (deletions only)pnpm typecheck— passesBehavior Changes
Parity Contract
Duplicate / Superseded PR Handling