Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0280: Plugin-Owned UI Localizes from the Host Locale
Context
The host resolves only the plugin copy it renders itself: manifest.i18n for
identity and inline locale maps on a few chrome labels. Extending that to
generated settings, commands, tools, and themes would grow a second incomplete
i18n system inside the manifest.
Decision
- For plugin-owned copy the host publishes the active language and nothing else:
pi.app.getLocale(),getAppearance().locale, andappearance:changedreach open panels and loaded plugin processes. - Plugin-owned UI — panels, views, widgets, settings destinations, toasts, and runtime command titles — localizes itself from that tag.
- No further
PluginLocalizedStringmaps are added to contribution fields: generatedcontributes.settingstitle,description, andenum[].labelstay author-language strings, and a plugin needing localized settings shipssettingsDestinations. - Host-owned surfaces that render without plugin code keep
manifest.i18n(ADR 0267) and the shipped chrome labels.
Consequences
- A language switch restyles plugin-owned UI live, without a reload or a registry rewrite, and authors need not maintain bilingual maps per setting.
Alternatives
- Host-resolved locale maps on every contribution field: rejected; two models in
one manifest, still only
enandzh-CN. - Resolve plugin copy in the renderer: rejected in ADR 0267; the renderer must not parse a manifest.