Skip to content

Conversation

@0xbrayo
Copy link
Member

@0xbrayo 0xbrayo commented Jan 10, 2026

Important

Hide 'top_titles' visualization on Android in SelectableVisualization.vue.

  • Behavior:
    • In SelectableVisualization.vue, hide 'top_titles' visualization on Android by adding && !activityStore.android.available condition to the v-if directive.

This description was created by Ellipsis for 1c08147. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 1c08147 in 1 minute and 26 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/components/SelectableVisualization.vue:31
  • Draft comment:
    Check that 'activityStore.android.available' is always defined and reactive. Consider moving the Android check into a computed property for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 15% vs. threshold = 50% This comment appears to be speculative and not actionable. The first part ("Check that...is always defined and reactive") is asking the author to verify something rather than pointing out a concrete issue. The second part ("Consider moving...into a computed property") is a refactoring suggestion but doesn't show strong evidence that there's an actual problem. Looking at the code, activityStore.android.available is used elsewhere in the file (line 176) in the same way, so it's already an established pattern. The comment doesn't identify a specific bug or issue - it's more of a "make sure this works" type of comment, which violates the rules about not asking authors to confirm or verify things. Could there be a legitimate concern about reactivity or the property being undefined? Perhaps in some edge cases the android property might not exist on the store? The suggestion about computed properties could improve code organization and testability. Even if there were edge cases, the comment doesn't provide evidence that this is actually a problem. The pattern is already used elsewhere in the file (line 176), so if it were broken, it would be broken there too. The computed property suggestion is a refactoring idea but not a clear code quality issue that needs to be fixed. Without strong evidence of an actual problem, this falls into the category of speculative comments that should be removed. This comment should be deleted. It asks the author to verify/check something rather than pointing out a concrete issue, and the refactoring suggestion lacks strong justification. The pattern used is consistent with the rest of the file.

Workflow ID: wflow_lUqeCNYxa80H80uF

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@codecov
Copy link

codecov bot commented Jan 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.30%. Comparing base (291da6f) to head (1c08147).
⚠️ Report is 36 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #737      +/-   ##
==========================================
+ Coverage   25.98%   26.30%   +0.31%     
==========================================
  Files          27       29       +2     
  Lines        1643     1684      +41     
  Branches      279      288       +9     
==========================================
+ Hits          427      443      +16     
- Misses       1190     1219      +29     
+ Partials       26       22       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps
Copy link

greptile-apps bot commented Jan 10, 2026

Greptile Overview

Greptile Summary

This PR attempts to hide the 'Top Window Titles' visualization on Android devices by adding a condition && !activityStore.android.available to the rendering logic in SelectableVisualization.vue.

What Changed

A single line modification adds an Android availability check to prevent rendering the top_titles visualization when an Android watcher is present.

Critical Issues Found

1. Breaks Multi-Device Scenarios

The implementation has a critical flaw for users running both Android and desktop watchers simultaneously. When both android.available and window.available are true, the condition type == 'top_titles' && !activityStore.android.available evaluates to false, completely hiding desktop window titles even though that data is available and valid.

2. Inconsistent Availability Flag

The available flag for top_titles (line 180) only checks window.available, but the rendering condition (line 31) also requires !android.available. This creates inconsistent behavior where the dropdown shows the visualization as available but nothing renders.

Root Cause Analysis

The underlying issue is that Android's appQuery (in src/queries.ts) populates title_events with Android activity classnames (merged by ["app", "classname"]), which are stored in the same window.top_titles field as desktop window titles. These classnames aren't meaningful to display as "window titles" on Android, but the current architecture doesn't separate Android and desktop title data.

Recommended Fix

Rather than hiding at the rendering level, the fix should:

  1. Update the available flag to match the rendering condition for consistency
  2. Consider separating Android and desktop title data in the store architecture
  3. Or only populate window.top_titles from desktop queries, not Android queries

The default views already correctly exclude top_titles from Android views (see src/stores/views.ts line 61), so this is primarily about preventing manual addition or multi-device scenarios.

Confidence Score: 2/5

  • This PR has a critical logic flaw that breaks multi-device usage and should not be merged as-is
  • The implementation has a critical bug that completely hides desktop window titles for users with both Android and desktop watchers running. While the intent to hide Android classnames from the titles view is valid, the approach breaks legitimate use cases. Additionally, the inconsistency between the availability flag and rendering condition creates confusing UX. The change needs architectural improvements to properly separate Android and desktop title data.
  • src/components/SelectableVisualization.vue requires significant attention - the logic needs to be redesigned to handle multi-device scenarios properly

Important Files Changed

File Analysis

Filename Score Overview
src/components/SelectableVisualization.vue 2/5 Added condition to hide top_titles on Android, but logic breaks for users with both Android and desktop watchers, and doesn't update the availability flag consistently

Sequence Diagram

sequenceDiagram
    participant User
    participant SelectableVisualization
    participant ActivityStore
    participant Queries
    participant Server

    Note over User,Server: Scenario: User with both Android and Desktop watchers

    User->>ActivityStore: Load activity data
    ActivityStore->>Server: get_buckets()
    Server-->>ActivityStore: buckets (android + window)
    ActivityStore->>ActivityStore: android.available = true<br/>window.available = true
    
    alt Desktop Query Path
        ActivityStore->>Queries: query_desktop_full()
        Queries->>Server: fullDesktopQuery
        Server-->>Queries: {app_events, title_events (window titles)}
        Queries->>ActivityStore: query_window_completed(data)
        ActivityStore->>ActivityStore: window.top_apps = app_events<br/>window.top_titles = title_events
    end

    alt Android Query Path (also runs)
        ActivityStore->>Queries: query_android()
        Queries->>Server: appQuery (merge by app+classname)
        Server-->>Queries: {app_events, title_events (classnames)}
        Queries->>ActivityStore: query_window_completed(data)
        Note over ActivityStore: OVERWRITES window.top_titles<br/>with Android classnames!
    end

    User->>SelectableVisualization: View top_titles visualization
    SelectableVisualization->>SelectableVisualization: Check: type == 'top_titles' &&<br/>!android.available
    Note over SelectableVisualization: Evaluates to: true && !true = FALSE
    SelectableVisualization->>User: ❌ Nothing rendered<br/>(Desktop titles hidden!)
    
    Note over User,Server: ISSUE: Desktop window titles are lost<br/>even though they should be available
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Jan 10, 2026

Additional Comments (1)

src/components/SelectableVisualization.vue
The available flag for top_titles is inconsistent with the rendering condition on line 31.

Currently:

  • Line 180: available: this.activityStore.window.available (doesn't account for Android)
  • Line 31: Renders only if type == 'top_titles' && !activityStore.android.available

This creates confusing behavior:

  1. On Android-only devices: available = false correctly shows "(no data)" in the dropdown
  2. On devices with both Android and desktop: available = true (shows as available in dropdown), but line 31 prevents rendering (shows nothing)

For consistency, the available flag should match the actual rendering condition. If Android should prevent showing top_titles, then update this to:

        top_titles: {
          title: 'Top Window Titles',
          available: this.activityStore.window.available && !this.activityStore.android.available,
        },

This would make the availability check consistent with the rendering behavior and properly show "(no data)" in the dropdown when Android is present.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/SelectableVisualization.vue
Line: 178:181

Comment:
The `available` flag for `top_titles` is inconsistent with the rendering condition on line 31. 

Currently:
- Line 180: `available: this.activityStore.window.available` (doesn't account for Android)
- Line 31: Renders only if `type == 'top_titles' && !activityStore.android.available`

This creates confusing behavior:
1. On Android-only devices: `available = false` correctly shows "(no data)" in the dropdown
2. On devices with both Android and desktop: `available = true` (shows as available in dropdown), but line 31 prevents rendering (shows nothing)

For consistency, the `available` flag should match the actual rendering condition. If Android should prevent showing top_titles, then update this to:
```suggestion
        top_titles: {
          title: 'Top Window Titles',
          available: this.activityStore.window.available && !this.activityStore.android.available,
        },
```

This would make the availability check consistent with the rendering behavior and properly show "(no data)" in the dropdown when Android is present.

How can I resolve this? If you propose a fix, please make it concise.

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.

1 participant