Skip to content

feat(desktop): a product sets the prefix of an app window's title - #30

Merged
doodlewind merged 1 commit into
mainfrom
feat/desktop-window-title-prefix
Oct 6, 2026
Merged

doodlewind merged 1 commit into
mainfrom
feat/desktop-window-title-prefix

Conversation

@doodlewind

Copy link
Copy Markdown
Contributor

The title of an installed app's window, in its caption and its task button, was PocketJS: <app title>, written as a string in the System UI. A product that installs this System UI can now set the prefix.

The option

windowTitlePrefix in pocket.about.json, the file beside the System manifest that holds a product's About text since #28:

{
  "body": ["The desktop in your room."],
  "link": "example.org",
  "windowTitlePrefix": "My Desktop"
}
  • A file without the field gives PocketJS. This repository's pocket.about.json does not set it, so its desktop reads PocketJS: Hero as before.
  • An empty string titles the window with the app's title alone.
  • The System UI's own windows (Notepad, Minesweeper, the folders, About) take no prefix, as before.

Why this file and not pocket.system.json: the System manifest's schema is PocketJS's (contracts/spec/pocket-system.ts) and sets additionalProperties: false, so a new field there needs a schema change and a new pin in every product. #28 put the About text beside the manifest for the same reason.

What changed

  • shells/desktop/src/system-ui/pocket-apps.ts: readWindowTitlePrefix, WINDOW_TITLE_PREFIX, DEFAULT_WINDOW_TITLE_PREFIX and appWindowTitle(title).
  • shells/desktop/src/system-ui/app.tsx: the one place that titled an app's window calls appWindowTitle.
  • shells/desktop/test/system-ui-sim.test.ts: the titles it looks for come from appWindowTitle, so the test follows the file.
  • shells/desktop/test/system-ui.test.ts: the default, a product's value, an empty value, values of other types, and that the About text reads the same with the field beside it.
  • shells/desktop/README.md: the field, beside the About text.

Checks

bun run check at cd12366: exit 0 (asset check, typecheck of every shell, and the 3DS, iPod, desktop and touch tests, the desktop's simulator, wrap and text suites among them).

Not verified

The simulator runs this repository's own bundle, which uses the default. A bundle built with another prefix is covered by the unit tests of the two functions, not by a simulator run. Pocket Studio will build one and holds its own test to it.

🤖 Generated with Claude Code

An installed app's window was titled "PocketJS: <app>" by a string in the
System UI. The prefix is now `windowTitlePrefix` in pocket.about.json, the
file beside the System manifest that already holds a product's About text:
the System manifest's schema belongs to PocketJS and takes no other field.
A file without it gives PocketJS, so this repository's desktop reads as
before; an empty string titles the window with the app's title alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doodlewind
doodlewind merged commit aa60fbd into main Oct 6, 2026
2 checks passed
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