Skip to content

refactor(app): remove dead screen-intelligence UI remnants (#5056) - #5102

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
graycyrus:fixes/rm-dead-intelligence-remnants
Jul 24, 2026
Merged

refactor(app): remove dead screen-intelligence UI remnants (#5056)#5102
senamakel merged 1 commit into
tinyhumansai:mainfrom
graycyrus:fixes/rm-dead-intelligence-remnants

Conversation

@graycyrus

Copy link
Copy Markdown
Contributor

Summary

  • Remove six orphaned modules left from an earlier screen-intelligence UI (zero importers anywhere in the app).
  • The screen-intelligence feature is untouched — only unreferenced remnants are deleted.
  • No behaviour change.

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.ts
  • hooks/useIntelligenceApiFallback.ts
  • hooks/useScreenIntelligenceItems.ts (+ co-located __tests__/useScreenIntelligenceItems.test.ts)
  • components/intelligence/SyncConfirmDialog.tsx
  • components/intelligence/SyncBudgetDialog.tsx

Deliberately kept: svgForceLayout.worker.ts — it is live via useSvgForceLayoutMemoryGraph (the doc-audit mis-flagged it). The ScreenIntelligencePanel, 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:

Submission Checklist

Impact

  • Runtime: none — deleted modules were unreachable.
  • Build: smaller type/compile surface. pnpm typecheck passes.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fixes/rm-dead-intelligence-remnants
  • Commit SHA: (this commit)

Validation Run

  • pnpm --filter openhuman-app format:check — N/A / clean (deletions only)
  • pnpm typecheck — passes
  • Focused tests: N/A (removed only a deleted hook's test)
  • Rust fmt/check (if changed): N/A (no Rust)
  • Tauri fmt/check (if changed): N/A

Behavior Changes

  • Intended behavior change: none (dead-code removal)
  • User-visible effect: none

Parity Contract

  • Legacy behavior preserved: yes — the screen-intelligence feature + MemoryGraph worker are untouched
  • Guard/fallback/dispatch parity checks: N/A

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none
  • Canonical PR: this
  • Resolution: N/A

…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.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (6)
  • app/src/components/intelligence/SyncBudgetDialog.tsx
  • app/src/components/intelligence/SyncConfirmDialog.tsx
  • app/src/hooks/tests/useScreenIntelligenceItems.test.ts
  • app/src/hooks/useIntelligenceApiFallback.ts
  • app/src/hooks/useIntelligenceStats.ts
  • app/src/hooks/useScreenIntelligenceItems.ts
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c8a990e3-10a6-4c6d-832c-2e33426bc8b5

📥 Commits

Reviewing files that changed from the base of the PR and between 40852cd and c04892b.

📒 Files selected for processing (6)
  • app/src/components/intelligence/SyncBudgetDialog.tsx
  • app/src/components/intelligence/SyncConfirmDialog.tsx
  • app/src/hooks/__tests__/useScreenIntelligenceItems.test.ts
  • app/src/hooks/useIntelligenceApiFallback.ts
  • app/src/hooks/useIntelligenceStats.ts
  • app/src/hooks/useScreenIntelligenceItems.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@senamakel senamakel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 senamakel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@senamakel
senamakel marked this pull request as ready for review July 24, 2026 00:16
@senamakel
senamakel requested a review from a team July 24, 2026 00:16
@senamakel
senamakel merged commit c9f2582 into tinyhumansai:main Jul 24, 2026
18 of 20 checks passed
@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR deletes six orphaned source files left over from an earlier screen-intelligence UI iteration. All six modules have zero importers in app/src (verified by search), so this is a safe dead-code removal with no runtime or build-time side effects.

  • Deleted hooks (useIntelligenceStats, useIntelligenceApiFallback, useScreenIntelligenceItems) were never imported after the UI was replaced; their co-located test file is also removed.
  • Deleted components (SyncBudgetDialog, SyncConfirmDialog) are standalone modal dialogs with no referencing parent components anywhere in the app.

Confidence Score: 5/5

Deletion-only PR with zero importer references confirmed across the entire app/src tree — no live code path is affected.

Every removed file was verified to have no importers in the codebase. The screen-intelligence feature itself (ScreenIntelligencePanel, useScreenIntelligenceState, svgForceLayout.worker.ts) is fully untouched. The co-located test is correctly removed alongside its hook. There is nothing in this diff that can regress live behaviour.

No files require special attention — all six deletions are clean orphans with no downstream consumers.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "refactor(app): remove dead screen-intell..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused/redundant features: screen intelligence, order complete, desktop automation, autocomplete, Whisper, unnecessary runtimes

2 participants