Repository navigation
feat(desktop): product About text, theme lines and content theme parts - #28
Merged
Merged
Conversation
The About dialog's body lines and its link come from pocket.about.json beside
the System manifest, read at bundle time through pocket-apps.ts. The manifest
schema has no field for product copy, so the text has its own file; both of
its fields are optional. This repository's file holds the text the dialog
showed before, so its About is unchanged; a product that bundles the System UI
under its own pocket.system.json replaces the file.
The System UI protocol gains a theme line in each direction. The host sends
{t:"theme", id} to select a theme; an id that names no theme is ignored. The
shell sends {t:"theme", id} once after boot and after every frame that ends in
another theme, whether the Settings menu, the cycle chord or the host's line
changed it.
DesktopTheme gains content parts for what a program draws inside its window: a
list box with its rows and a scroll mark, a group frame, a value well, a radio
mark, a progress bar, and the option row and push button a Pocket app presses,
which carry the focus: and active: variants the framework's focus manager
applies. The Shut Down dialog draws its radio marks from them, and a Pocket app
that imports theme.ts draws its window in the active theme. Three metrics
(listPad, scrollW, groupPadX) carry the geometry a program lays text out
against.
No text of the desktop names another product: the XP theme's label is "XP",
the Shut Down dialog's caption is "Shut Down", and the (C:) listing shows a
"System" folder and a "Batch File" type. The caption carries no name because
the dialog is 300px wide and Aqua's centered caption clips a longer title.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
doodlewind
force-pushed
the
feat/desktop-product-about-theme
branch
from
October 4, 2026 09:43
e582514 to
cecd944
Compare
doodlewind
marked this pull request as ready for review
October 4, 2026 10:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
About text from the product. The About dialog's body lines and its link no longer live in
programs.tsx. They come fromshells/desktop/pocket.about.json, which sits besidepocket.system.jsonand is imported at bundle time throughpocket-apps.ts(DESKTOP_ABOUT, read byreadAbout):{ "body": ["One line of text.", "Another line."], "link": "example.org/product" }The System manifest was the first choice of carrier, as it is for
DESKTOP_NAME. Its schema (PocketSystemV1,additionalProperties: false) has no description or homepage field, and the schema is not changed here, so the text has its own file.bodyholds one text line per entry; the dialog does not wrap them and its fixed size holds four above the link. Both fields are optional: withoutbodythe dialog shows no lines, withoutlinkno link row. This repository's file holds the four lines and the link the dialog showed before, so its About is unchanged. A product that bundles the System UI under its own manifest replaces the file.Theme lines. The System UI protocol (
src/system-ui/svc.ts) gains one line in each direction:The host line calls the same
setThemethe Settings menu calls, so windows keep their client rectangles and open menus close. An id that names no theme, a missing id and a non-string id are ignored (isThemeIdintheme.ts). The System UI reports once after boot and after every frame that ends in another theme than the one last reported, whether the Settings menu, the cycle chord or the host's line changed it. Lines that arrive within one frame produce one report.Content parts in the theme contract.
DesktopThemegains parts for what a program draws inside its window, filled in for all three themes:listWell,listRow(selected, zebra),listText,listDetailTextscrollTrack,scrollThumbgroupBox,groupLabel,groupLabelTextfieldWellradioRing(checked),radioFace(checked),radioDotprogressTrack,progressFilloptionRow,contentButton(primary)ChromeMetricsgainslistPad,scrollWandgroupPadX, the geometry a program truncates and wraps text against.optionRowandcontentButtoncarryfocus:andactive:variants in the literal. A Pocket app's guest runs the framework focus manager, and the core applies those variants to the focused and the pressed node;dialogButtonkeeps itspressedargument because the System UI hit-tests its own dialogs. The Shut Down dialog now draws its radio marks fromradioRing/radioFace/radioDot. Classic's three literals are the ones the dialog had, so Classic paints the same pixels; XP and Aqua get their own mark. The header rule oftheme.tsstands: no theme id is special-cased outside that file.No other product's name in the UI.
XP_THEME.labelis"XP"(was"Windows XP"), the Shut Down dialog's caption is"Shut Down"(was"Shut Down Windows"), and the (C:) listing shows a folder namedSystem(wasWindows) and the file typeBatch File(wasMS-DOS Batch File). The README names the themeXPas well; the site already did.The caption does not carry
DESKTOP_NAME. The dialog is 300px wide, and Aqua centers the title between the control cluster and a balancing spacer: rendered in the sim at 2×, "Shut Down Pocket Shell Desktop" lost its first and last characters there, while "Shut Down" fits in all three themes.Found in the same sweep and left unchanged:
docs/xp-theme.pnganddocs/aqua-theme.pngshow the Settings flyout with the old label. They are documentation assets regenerated bybun run desktop capture; a recapture also changes the welcome note's first line, which still reads "Pocket Desktop" in the committed images, so it is a docs refresh of its own.THIRD_PARTY.mdand the header ofgen-assets.tsname Windows XP and Mac OS X where they state which fonts those systems ship and why Inter stands in. Comments and identifiers (XP_THEME,xp-*.svg) keep their names.W95FA, which is that font's name.Why Pocket Studio needs it
Pocket Studio puts this System UI on the laptop in its room, under its own System manifest (title
Pocket Nexus), with three Pocket apps of its own.theme.tsand draw from the content parts, with the five theme font slots and the icons in their own packs, so each window matches the desktop around it in all three themes.Verification
Run in a clean clone of this branch with the pinned PocketJS submodule (
0ca1b362), afterbun run setup.bun run checkcheck:assetstypecheck(root and four shells)shells/desktoptestshells/desktoptest:simshells/desktoptest:wrap,test:textbun run desktop test:webNew coverage:
system-ui.test.ts:DESKTOP_ABOUTequals the file and the four lines and link the dialog had;readAboutwith a missing body, a missing link, entries that are not strings and values that are not objects; the theme labels areClassic 98,XP,Aqua;isThemeId; every content part of every theme parses as a class literal (parseClassLiteralfrom the pinned compiler, since a literal the compiler rejects compiles to no style and fails no build); the three metrics mirror their literals;optionRowandcontentButtoncarry both variants; a selected row differs from an unselected one; Classic's radio literals equal the onesShutdownViewhad.system-ui-sim.test.ts, "the shell reports its theme and takes the host's theme line": one report after boot and none while the theme stands; the cycle chord, the host's line and a pick in the Settings flyout each produce one report; the active theme again, an unknown id, a numeric id and a missing id change neither the tree nor the reports; the host's line closes an open launcher; two lines within one frame give one report of the last.system-ui-sim.test.ts, "no text of the desktop names another product": no text node matchesWindowsorMS-DOSwith the welcome note, the theme flyout, the Shut Down dialog and the (C:) listing on screen; the dialog's caption is one text node readingShut Down; in each theme the dialog holds that theme's checked and unchecked radio marks; the listing holdsSystemandBatch File.Classic 98,XP,Aqua; the existing About test reads each body line and the link fromDESKTOP_ABOUT, in order.With the host theme handler disabled, both new sim tests fail.
Not run locally, left to CI:
desktop test:rust,desktop build,desktop package:linux, the site build and its smoke check.🤖 Generated with Claude Code