Skip to main content

Research: the apps that leave the image (2026-11-06)

Rendered from corpus/wiki/research-imbatranim-apps.md · updated 2026-11-09

This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.

The owner asked on 2026-11-06 to rename imbatranim-office to imbatranim-apps, make it "a repo for the apps that can be installed to imbatranim", list the apps we made that should move there as opt-in installs "so that the image comes smaller and cleaner at first install", allow three kinds of app (client only, a WASM module, and suites like Office), and check whether older apps such as the PDF viewer should go. Research only; nothing was built.

Outcome after the grill (2026-11-06). §6 has the decisions. The proposal below was the starting point, and the table's last column shows where each app ended.

Short answer, as first proposed. The image barely shrinks: moving every app that can go saves about 14.5 MB of 324, and 13.9 MB of that is Monaco. The 2026-07-16 bar is already "≤ ~400 MB, with cold start and RAM as the real measure" (open-questions.md), and the add-ons are lazy chunks that cost neither until opened. What the move does buy: a Start menu with seven apps instead of 25, about 29,000 source and 8,000 test lines out of the OS repo, and apps released without an OS deploy. Nine apps can move with no change to the kit contract, one folds into Notepad, and eight can't move yet. The work waits in the backlog as todos (§7).

1. What the image holds​

imbatranimos:1.0, built 2026-11-05, measured with docker history:

LayerSize
Alpine + Node 24 base166 MB
Nix in the image (Linux apps)56 MB
Root node_modules (backend runtime)47.5 MB
apk add (git, dbus, libxkbcommon, tini)18.7 MB
The desktop build (public/), every app included16.8 MB
Backend node_modules and dist10.4 MB
Wayland host2.2 MB
Total324 MB

Of the desktop's 16.7 MB (the 2026-11-03 build), Monaco's workers and languages are 13.9 MB, the Terminal's xterm 0.4 MB, Markdown Editor 0.2 MB, and every other app 6-91 kB. The frontend libraries never reach the image apart from what Vite bundles. The backend modules behind the apps are small too; the one heavy runtime dependency is the Browser's proxy (@mercuryworkshop/*, 6.5 MB).

2. Every app, and what moving it takes​

Lines are source / tests. "Can't carry" is what an AddonManifest has and a catalog app (suiteAppSchema in apps/backend/src/modules/marketplace/catalog.ts) doesn't: background, widgets, commandSources, service.

AppLinesChunkOwn backend moduleBlockerProposal
Settingscore48 kBprefs, auth…is the OSBase
Files5,199 / 98291 kBfiles (3,180)the OS's file surfaceBase
Terminal1,132 / 295402 kBpty (1,358)the real PTYBase
Notepad1,338 / 42716 kB—opens .txt, .log; dotfilesBase, takes Markdown Editor's job
System Monitor933 / 12011 kBsystem (1,101)widgets, service, /procBase
Logs418 / 877 kBlogs (1,141)shows sign-in attemptsBase
Browser388 / 686 kBbrowser (1,185)the machine's own proxyBase
Minesweeper, Solitaire1,131 / 31916 kB—noneWave 1, Games (first)
Calculator2,594 / 71235 kB—noneWave 1, Accessories
Paint914 / 11815 kB—noneWave 1, Accessories
Snipping Tool1,396 / 16121 kB—none (hands off to Paint)Wave 1, Accessories
Image Viewer910 / 17212 kB—the opener for imagesWave 1, Accessories
Media Player2,050 / 45327 kB—the opener for audio and videoWave 1, Accessories
Code Editor + Diff2,060 / 48521 kB + 13.9 MB—opener for code files and the .csv fallback; Monaco's build under the 1 GiB cap is unmeasuredWave 1, Developer
Markdown Editor2,629 / 1,091199 kB—Notepad's description is "Markdown text editor" and it renders a preview with the same react-markdownDrop, its extras go to Notepad
Clock2,132 / 60920 kBclock (544)background, widgets, its dataWave 2
Calendar3,266 / 1,18436 kBcalendar (532)background, widgets, its dataWave 2
Todo1,641 / 29618 kBtodos (584)background, its dataWave 2; moved 2026-11-09, Accessories
Sticky Notes1,103 / 1378 kBsticky-notes (326)its dataWave 2
Bookmarks1,726 / 56617 kBbookmarks (888)commandSources, its data, reads the Browser's configWave 2; moved 2026-11-09, Accessories
Git GUI1,947 / 32628 kBgit (2,768)the OS runs git for itWave 3; moved 2026-11-09, Developer
REST API Client2,946 / 1,11539 kBhttp-proxy (783)the SSRF-guarded proxyWave 3; moved 2026-11-09, Developer
Archive Manager923 / 5213 kBarchive (2,164)opener for zip and tar; unpacks in homeWave 3, or base

Wave 1 needs only fs, intents, notify and window, which a kit app already has. Wave 2 needs the contract to grow and an answer for where each app's data lives, which is in the OS's database today:

  1. an OS-side store each app reaches through system (one small module instead of five);
  2. a server per group, which costs about 100 MB idle, one of four server slots and a 2.7-5 s cold start on a 1 GiB box (Office's, measured 2026-10-28);
  3. files in the home folder, which need a migration.

Wave 3 apps lean on modules that do system work (git, an outbound proxy, unpacking). Either those modules stay in the OS as capabilities, or the apps stay built in.

Games are pure client, but their own index calls them "the identity-affirming tier: the two games a Win7-shaped desktop cannot not have". Moving them reverses that comment, which the owner's ask covers.

3. Kinds of app, install groups and the rename​

In research-imbatranim-apps-layout.md: the three kinds of app (client only, a WASM engine from npm under a kit UI, kit apps with a server) are runtime needs, not install units; the groups (Office, Accessories, Games, Developer) are one descriptor and one Start folder each; the layout is unproven, because the office build is anchored at the repo root; and the rename keeps the descriptor id imbatranim-office.

4. Drop or merge​

  • PDF Viewer: already done. PDF Viewer and norPDF were merged into Office's PDF on 2026-10-21 and the built-ins removed on 2026-10-28, which shrank the image by 2.7 MB (log.md). The crafts (PdfCraft and the others) are Rust, alpha and a reference only, by the office repo's locked decision. Office's PDF is the rewrite.
  • Markdown Editor into Notepad. This is the clearest overlap: Notepad already calls itself a markdown editor with a live preview. Notepad takes .md and whatever Markdown Editor does that it lacks (code highlighting in the preview through rehype-highlight, to check). This retires 199 kB and 3,700 lines from the OS, some of which move into Notepad.
  • Bookmarks into the Browser: a question. It reads /browser/config and feeds the command palette, but it is also a link organiser of its own.
  • The Browser and Firefox: keep both. The built-in costs 6 kB plus its proxy and works on the phone; Firefox costs 506-593 MB.
  • A leftover. apps/backend/src/modules/notes/ holds only dto/upsert-recent.dto.ts, which nothing imports. Its module was deleted in August (old brief 94).

5. Costs of moving an app out​

  • A fresh OS opens less. Without Accessories, a .png or .mp3 gets the Marketplace sentence marketplaceOpeners.ts already gives .docx. Without Developer, .json and .csv fall to Notepad.
  • Installs build on the box. Each one runs npm ci and Vite in the live container, under the 1 GiB cap. Hollow's took 18 s plus under a second (2026-10-07); Office's leaves about 853 MB of node_modules on the home volume (measured on the local checkout's install). Monaco's build under the cap is unmeasured.
  • Backups leave builds out. After a restore, every group shows "build missing" until reinstalled.
  • Kept ids keep the owner's choices. As with Office (2026-10-28), pins, startup entries and Open-with choices stay in the dotfiles and come back when the app is installed. A kept id needs no RETIRED_APP_IDS pair.
  • The cheap alternative is no move at all: ship the same built-ins switched off, with only the base enabled. Start gets just as short, but the image and the OS repo stay as they are.

6. Owner decisions​

The owner approved the plan on 2026-11-06 ("looks good, write the briefs") and was grilled the same day. The durable calls are in decisions-marketplace-suites.md and decisions-themes.md:

  • The base serves a normal user: browsing, media, small coding. Sixteen apps stay built in, and Code Editor, Image Viewer, Media Player, Calculator, Clock, Calendar, Paint, Snipping Tool and Sticky Notes joined the first seven.
  • The OS keeps the minimum; apps add on top. archive, git and http-proxy stay as OS services. Files opens archives like folders, so Archive Manager goes, and Markdown Editor folds into Notepad.
  • Installable apps keep their data as real files in ~/.local/share/imbatranim/<app-id>/. It is kept on uninstall unless the owner ticks "Also remove its data", and alarms stop with their app.
  • Groups are the install unit: Office, Games, Developer and Accessories (Todo and Bookmarks). Start gets search, pins and an A-Z list, with no folders.
  • WASM engines from npm may run in the tab. PDF's image decoders come first, and CAD's DWG stays on the server.

The calls left are engineering ones, proposed in each todo.

7. The briefs​

Grilled and promoted on 2026-11-06 to briefs 63-76, in run order. Briefs 50-62 were the first drafts, now in briefs/superseded/. Dropped in the grill: the todos that moved Calculator, Paint and Snipping Tool, Image Viewer and Media Player, Code Editor and Diff, and Clock and Calendar.

BriefWhat
63, from imbatranim-office-becomes-imbatranim-appsThe rename (first)
64, from games-install-from-imbatranim-appsGames; settles the group layout (second)
65, from notepad-takes-over-markdown-editors-jobNotepad takes over Markdown Editor
66, from files-handles-archives-and-archive-manager-goesFiles opens archives like folders; Archive Manager goes
67, from kit-apps-may-run-webassemblyThe desktop allows WASM
69, from apps-get-a-data-folder-of-their-ownA data folder per app (system.data)
71, from catalog-apps-bring-background-services-and-commandsCatalog apps bring background services and palette sources
72, from start-gets-search-pins-and-an-a-to-z-listStart: search, pins, A-Z list
73, from the-chooser-links-to-the-marketplaceThe chooser links to the Marketplace
75, from todo-and-bookmarks-install-as-accessoriesTodo and Bookmarks as Accessories (after Games, hooks, data folder)
76, from git-gui-and-rest-api-client-join-developerGit GUI and REST API Client as Developer (after Games, data folder)
68, from apps-run-as-their-own-identityUnix-style identity and file modes for apps
70, from installable-apps-get-files-by-grantInstallable apps see other files only by grant
74, from url-apps-install-natively-once-trustedURL apps run natively: verified, or trusted after a warning

In imbatranim-office, after brief 67: its brief 06, pdf-decodes-jpeg2000-and-jbig2-images. cad-reads-dwg-in-the-tab was dropped.