Skip to content

test(desktop): tidy /model palette test (Greptile P2 follow-up to #330) - #331

Merged
Kyzcreig merged 1 commit into
mainfrom
chore/model-slash-test-tidy
Jul 14, 2026
Merged

Kyzcreig merged 1 commit into
mainfrom
chore/model-slash-test-tidy

Conversation

@Kyzcreig

Copy link
Copy Markdown
Collaborator

Addresses the two Greptile P2s on #330: adds an explicit positive assertion that /model appears in desktop suggestions, and fixes the now-inverted 'Unlike /model' comment. Test-only; 16/16 pass.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown

Greptile Summary

This is a test-only cleanup following Greptile P2 feedback on #330 for the desktop slash-command palette tests.

  • Adds an explicit positive assertion that /model surfaces in desktop suggestions (isDesktopSlashSuggestion('/model')).toBe(true)), closing the gap where the test block claimed to cover /model in its name but never asserted it.
  • Fixes the comment on the /resume session-picker test from "Unlike /model" to "Like /model", which was factually inverted (both /model and /resume appear in the popover; only their aliases stay hidden).

Confidence Score: 5/5

Safe to merge — changes are confined to a test file and address two well-scoped correctness gaps left by the previous PR.

Both changes are accurate: the new assertion matches observed behavior (the dedicated model-picker test at line 186 confirms /model is registered), and the corrected comment now truthfully describes the shared popover behavior of /model and /resume. No production code is touched.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/lib/desktop-slash-commands.test.ts Adds a missing positive assertion for /model in the surfaces test and corrects an inverted comment in the /resume session-picker test; both changes are accurate and consistent with the existing test suite.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["/model slash command"] --> B{isDesktopSlashSuggestion?}
    B -->|true - shows in popover| C["Desktop suggestion palette"]
    A --> D{isModelPickerCommand?}
    D -->|true - opens overlay| E["Model picker overlay"]

    F["/resume slash command"] --> G{isDesktopSlashSuggestion?}
    G -->|true - shows in popover| C
    F --> H{isPickerCommand?}
    H -->|'session'| I["Session picker overlay"]

    J["/sessions alias"] --> K{isDesktopSlashSuggestion?}
    K -->|false - hidden| L["Not shown in palette"]
    J --> H

    M["/switch alias"] --> N{isDesktopSlashCommand?}
    N -->|true| O["Registered as desktop command"]
    M --> K2{isDesktopSlashSuggestion?}
    K2 -->|false - hidden| L
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["/model slash command"] --> B{isDesktopSlashSuggestion?}
    B -->|true - shows in popover| C["Desktop suggestion palette"]
    A --> D{isModelPickerCommand?}
    D -->|true - opens overlay| E["Model picker overlay"]

    F["/resume slash command"] --> G{isDesktopSlashSuggestion?}
    G -->|true - shows in popover| C
    F --> H{isPickerCommand?}
    H -->|'session'| I["Session picker overlay"]

    J["/sessions alias"] --> K{isDesktopSlashSuggestion?}
    K -->|false - hidden| L["Not shown in palette"]
    J --> H

    M["/switch alias"] --> N{isDesktopSlashCommand?}
    N -->|true| O["Registered as desktop command"]
    M --> K2{isDesktopSlashSuggestion?}
    K2 -->|false - hidden| L
Loading

Reviews (1): Last reviewed commit: "test(desktop): positive /model suggestio..." | Re-trigger Greptile

@Kyzcreig
Kyzcreig merged commit e9c18af into main Jul 14, 2026
24 checks passed
@Kyzcreig
Kyzcreig deleted the chore/model-slash-test-tidy branch July 14, 2026 14:51
Kyzcreig added a commit that referenced this pull request Jul 14, 2026
…nt (Greptile P2s on #330) (#331)

Co-authored-by: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com>
@Kyzcreig
Kyzcreig restored the chore/model-slash-test-tidy branch September 21, 2026 10:32
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