# refactor\(desktop\): classify app exports · PR \#10267 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/10267)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: cleanup-desktop/app-shell-helpers

Target branch: cleanup-desktop/electron-helpers

Head commit: 4c6bb9a0b545be177647d1d38a9fbc98c797492b

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/10267)

[Commits](https://git.cafe/pingdotgg/t3code/pull/10267/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/10267/diffs?format=markdown)

## Description

---

Desktop app, window, shell, SSH, and update modules had 18 unclassified runtime exports. This marks 14 canonical Effect service constructors as intentional public APIs and keeps four implementation constants and state helpers private without changing runtime behavior.

This is layer 3 of 5 in the desktop Knip cleanup stack.

Verification after the full stack: desktop typecheck; desktop Knip export audit; 831 desktop tests; changed-file lint and format checks. The native libsecret test cannot start on this machine because the system libsecret-1 development package is unavailable.

Model: gpt-6 astra. Harness: Codex in T3 Code.

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Make desktop app helpers private and document public service APIs
> - Removes the `export` keyword from internal helpers that are only used within their own module: `URL_HANDLER_DESKTOP_ENTRY_NAME` in `DesktopLinuxUrlHandler.ts`, `isInstallableDesktopUpdateState` in `remoteUpdateFlow.ts`, and `nextStatusAfterDownloadFailure` and `getCanRetryAfterDownloadFailure` in `updateMachine.ts`.
> - Adds public API documentation comments to every exported service-construction effect and service value across the desktop app modules, clarifying the intended public surface.
> - Behavioral Change: the four helpers above are no longer importable from outside their modules; any external consumers will need to be updated.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 4c6bb9a.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Documentation**
  * Improved public API documentation for desktop application services and constructors.

* **Refactor**
  * Reduced the public API surface by keeping several internal update helpers private.
  * No runtime behavior changes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
