Skip to content

fix(desktop): honor hidden application overrides during ID lookup - #12675

Merged
morluto merged 2 commits into
morluto:mainfrom
Plastic-time:rrfz/desktop-hidden-id-override
Nov 20, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
Plastic-time:rrfz/desktop-hidden-id-override

Conversation

@Plastic-time

@Plastic-time Plastic-time commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem and outcome

A user can remove a desktop application by installing a higher-priority entry with the same ID and Hidden=true. Looking up that ID with GIO returns no application. At 04b47507d, REA still returned the user's launch command. A hidden Application entry without an Exec field instead produced an invalid-entry error.

Read the selected entry while walking the data directories. A hidden Application masks its ID. A hidden file without an Application type lets the search continue. An absolute path selects the file directly. NoDisplay continues to affect menu visibility independently of ID lookup.

Fixes #12671.

Evidence and validation

The native reference was g_desktop_app_info_new from GLib/GIO 2.88.0 with two temporary XDG data roots, a lower system entry and controlled user overrides. A complete hidden application's ID was absent, while g_desktop_app_info_new_from_filename could still read it. NoDisplay=true and Hidden=false returned the user copy. A file containing only a Desktop Entry group and Hidden=true fell back to the system copy.

Three ID-lookup cases failed on the original implementation and both nearby controls passed. The final tests also check explicit-file error details, the public output keys and a refused read above a valid system copy. After the change, five suites passed 240/240 on Linux. Three domain suites passed 100/100 on Windows. These cover inventory, desktop fields and export consumers. Nine of eleven single-line mutations were caught by the runtime tests. Deleting a TypeScript field declaration or the existing cancellation recheck immediately after a nested search did not change these fixture results. The reviewed head was 94cf053f3. Node.js 24.22.1 and Vitest 5.0.3. The full static check passed on Windows with npm 11.19.1. The full repository test suite was not run for this head.

node node_modules/vitest/vitest.mjs run --coverage.enabled=false --maxWorkers=1 src/desktop/LinuxApplicationInventory.test.ts -t 'resolves the user override|without an Application type'
node node_modules/vitest/vitest.mjs run --coverage.enabled=false --maxWorkers=1 src/desktop/LinuxApplicationInventory.test.ts src/domain/desktop/desktopEntry.test.ts src/domain/desktop/desktopEntryValues.test.ts src/domain/desktop/appExportInstall.test.ts src/application/desktop/DesktopApplicationExport.test.ts
npm run check

Change and scope

The internal parser reads Hidden using the desktop boolean rules it already applies to Terminal. The capture output keeps its existing fields.

Contract and boundary impact

An ID masked by a hidden application gets the existing desktop_entry_not_found refusal. Direct file inspection still checks that the file is an Application entry with an Exec field. The path search keeps its existing read limits, cancellation and incomplete-search refusal.

Compatibility, safety, and release

Validation used local desktop entries. Querying those entries required no application launch. The fixtures use available executables. Checks of executable availability performed by a desktop environment are outside this change.

Desktop Entry Specification, recognized keys

Author readiness

Human owner: @Plastic-time

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

ID lookup now honors hidden Application overrides without changing direct-file inspection.

  • Hidden application entries now mask their desktop IDs during lookup.

No actionable issues found. Runtime tests were not run during this review. Whether another PR supersedes this one could not be checked because GitHub access required authentication.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Desktop entry selector] --> B{Absolute path?}
  B -->|Yes| C[Read selected file]
  B -->|No| D[Find candidate in next data directory]
  D --> E[Read candidate]
  E --> F{Hidden?}
  F -->|No| G[Check Application type and Exec]
  F -->|Yes| H{Application type?}
  H -->|Yes| I[Return not found]
  H -->|No| D
  C --> G
  G --> J[Build launch command]
  E -->|Read fails| K[Return refusal]
Loading

Reviews (3) · Last reviewed commit: "test(desktop): preserve refusal details ..." · Reviewed by Greptile

@Plastic-time
Plastic-time marked this pull request as ready for review November 20, 2026 01:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T01:56:12.812659Z 94cf053 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 460517d into morluto:main Nov 20, 2026
40 of 41 checks passed
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop capture selects applications hidden by a user override

2 participants