Skip to content

Rework how vfox+ presents vfox: fixes, plugin profiles, environments and navigation - #79

Draft
linghengqian wants to merge 30 commits into
mainfrom
refactor/usage-experience
Draft

linghengqian wants to merge 30 commits into
mainfrom
refactor/usage-experience

Conversation

@linghengqian

@linghengqian linghengqian commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

A rework of how vfox+ presents vfox, all in this one pull request. It fixes what is broken with the real vfox 1.1.0, brings back the motion of the desktop, turns what vfox+ knows about particular plugins into data, manages vfox in every environment (the computer, the distributions of WSL and development containers), and arranges the three interfaces around what vfox 1.1 can do: projects, the toolchain and the work that runs. More commits follow: a view of the work as a pipeline and a map.

Fixes and motion

  • Health check. vfox 1.1.0 exits with 1 when doctor finds an error, with the report on standard output, and it always finds path.not-activated for a caller outside of an activated shell, as the application is. The home page therefore showed a failed check whose message was }. The report is now read, and what vfox finds about the process that asks is left out. The captures, the fake vfox and the end-to-end test against the real vfox cover it.
  • Activating a shell. Every interface told people to add the Bash line to ~/.bashrc, on Windows too. It now offers Bash, Zsh, fish, PowerShell, Nushell or Clink, as the system of the machine that runs vfox has them, the person's own first. The inventory of the remote API carries them to the web interface and the phone app (vfox.activations).
  • Web interface. The settings icon shows while the settings are open; the rail has a menu button and its add button at the top; a page is named once, and a lost connection says so instead of a status dot; segmented lists have their gap; plugins have the avatars of the desktop, shapes of the Material library picked by the same hash (a test in mygo/gateway keeps them in step).
  • Repaint. The window did not ask for a frame when the health check ended, so a check that ended last left the home page checking (found by the sandbox job of CI).
  • CI tooling. measure-apk took a crash of uiautomator, which reads the screens for it, as one of the app's, and failed the phone job.
  • Motion of the desktop. The desktop showed every value at its target at once, whatever the platform asked. Its springs move now, and a new Animation setting chooses between following the system, moving even when the system asks for less motion, and not moving. Page transitions stay off. mygo has no switch over "reduce motion", so the full setting marks the springs as NonMotion and grows dialogs on a value of their own.
Web, before Web, after
The web home page before: a status dot in a top bar, a hero card and the Bash line The web home page after: the page names itself, shaped avatars and a card that picks the shell
The web home page on a phone before The web home page on a phone after

Plugin profiles

Adapting a plugin, or a new release of one, needs no release of the application any more.

  • Profile files. The profiles of the 20 plugins are JSON files in shared/profile/plugins, with a JSON Schema. Format 2 adds parts for some platforms (when), version names read by regular expressions instead of two hard-coded namings, filters that match a pattern, and toggle and text variables. docs/en/dev/profiles.md describes it.
  • Sources. Each section of a profile comes from the first of: the user's profiles/<plugin>.json; the plugin's own lib/vfox-plus.json (vfox packs lib, so it arrives with the plugin and works offline); the online directory (shared/profile on this repository's main: fetched at most once a day, through the update mirror, only the files that differ, each checked by SHA-256); the files the application ships; and inference. The unused FetchProfile and the root vfox-plus.json, which no packaged plugin could carry, are gone.
  • Safety. A profile is only data. It may not offer variables that change what runs (PATH, HOME, LD_*, NODE_OPTIONS, compilers, proxies, tokens, …); documentation links and preset addresses are https://; and a value that the application did not ship is shown and confirmed before it is set, on the desktop, the web interface and the phone app.
  • Interfaces. Switches for toggle variables, a text field for text ones; "Detect and link" is hidden for a plugin whose files show it has no Detect hook.
  • Tooling. vfxtool profile lint (with --plugin for the profile of a plugin, and a reusable workflow, profile-lint.yml, for plugin repositories) and vfxtool profile index.
  • Fixed on the way. A setting inferred from a plugin that is not an address could not be set at all; the filters inferred for a plugin whose profile declares none did not filter.

Compatibility

  • The web API drops profile.naming, which no client used, and adds capabilities, unvetted, on and off. Older phone apps keep working; a newer one takes a missing capabilities as able to detect.
  • Files of the user in the first shape still load. A section that format 2 does not read (a naming string, a search without a default) comes from the next source instead.
  • The application now requests shared/profile/index.json from main at most once a day, as it already asks GitHub for its latest release at startup. Until this lands, main has no such file, and the request fails without effect. The end-to-end build does not use the network for it.

Environments

vfox+ manages vfox in each environment on its own: the computer, every distribution of WSL (on Windows) and every development container of Docker, of the computer or of a running distribution (environments).

  • Discovery changes nothing and starts nothing; only Start starts an environment. WSL stops idle distributions by itself, so one that the person started stays started while vfox+ runs.
  • Running commands. Through wsl.exe --exec or docker exec, with a fixed sh wrapper that passes the arguments on as they are, takes variables from standard input (no secrets on command lines) and ends commands inside the environment on cancel (neither program forwards signals). Plugin files and profiles are read through the same layer.
  • Per environment: the vfox executable and extra variables (settings of the computer stay where they were), the plugin profiles for its platform, and a task lane of its own (serial within one, parallel across). A vfox older than 1.1.0, on the computer too, is read only instead of unusable.
  • Remote API: /api/environments, …/refresh, …/<id>/start and every vfox route under /api/environments/<id>/; the old routes stay the computer's. Events name the environment.
  • Interfaces: a switcher in the navigation rail (a strip on narrow windows and phones), a dialog that lists the environments and starts them, status pages for stopped, missing or broken vfox, a read-only banner, and the environment of each task; desktop, web interface and phone app.
  • Windows: the application is now a program of the window subsystem and starts its children with CREATE_NO_WINDOW; it used to open a console window beside its own.
  • CI: the real vfox runs in development containers of Alpine and Debian on Linux, and in a distribution of WSL 2 (imported from Alpine's root file system) on Windows Server 2025.

Navigation around vfox 1.1

The desktop, the web interface and the phone app have the same four destinations, Overview, Projects, Toolchain and Settings. The tasks are behind a dock under the other pages, which says what runs or what failed, and the overview lists them itself.

  • Projects (new): folders added on the computer, or suggested by development containers. Their .vfox.toml is read, each version that it asks for is shown with what vfox current says in the folder, and each is put right: an installation, or the use of an installed version that the name stands for. Install missing queues vfox install --yes name@version one by one (never install --all, which exits 0 also when everything fails), and a tool is added with vfox use --project.
  • Toolchain: SDKs and plugins together. One list of versions with tags (global, the project, linked, copy), and Add version: download, link one that the plugin finds on the machine (vfox link --detect), or install by name. The registry is a page of the toolchain.
  • Remote API: /api/projects (?refresh=true reads the files again), /api/projects/install, /api/sdks/<name>/detect, and tasks that work in a project name its folder. Adding a plugin of the registry from the browser or the phone works (it answered 400), and a list that failed to load is read again only after 3 seconds (an offline registry ran vfox without end).
  • Web interface: rewritten on lit-html, which updates the page where it changed instead of replacing HTML strings (a test forbids them), with View Transitions between pages and a plain fallback.
  • Security: requests name a project only to pick one that the application holds, whose own path is used; the browser and the phone add plugins through a call that reads no file of the computer.
  • The end-to-end tests, the screenshots, the memory measurements and measure-apk follow the new navigation.

A phone app from before this works with a computer that has it; a newer phone app on an older computer asks to update vfox+ where it shows projects.

Memory

The springs first cost about 14 MB after a few dialogs. Two causes, both removed:

  • The floating label of a text field changed its font size in every frame (25 sizes in one move), and Cairo, Pango, fontconfig and the glyph atlas keep what each size needs: about 8 MB of C memory and 4 MB of Go heap. It now moves in its two sizes, scaled in between; a test holds it to them.
  • The heap that drawing grew stayed resident while the window rested. It is freed two seconds after the last frame.

Medians of five runs under Xvfb, end-to-end build, fake vfox, MB of PSS (docs/en/dev/memory.md):

Home Node.js versions After five dialogs and every page
Reduced (nothing moves) 51 56 62
System (new default) 51 56 63
System, before these changes 51 58 76

On the Wayland compositor of WSLg, GTK keeps more buffers while frames are drawn, which the application cannot reach: about 9 MB more on the version list with motion.

Verification

  • go vet, go test -race with the coverage gate (core and state 87 %, ui 86 %), and the census of the screens, on Linux.
  • golangci-lint 2.15.0 (fmt --diff, run, run --build-tags e2e): no issues; the tests and Windows vet of shared/tooling.
  • End to end under Xvfb: fake, real (vfox 1.1.0), python, plugins and tray.
  • Plugin profiles: before the Go profiles were deleted, a temporary test compared all 20 on nine platforms with their JSON files, and the reading of thousands of version names: identical. All 20 pass vfxtool profile lint against the main branch of their plugin, and validate against the schema.
  • Web interface: type check, npm test and npm run build; the audit of the pages found no text under the contrast of WCAG AA, no size off the type scale and no control under 24 px.
  • vfxtool docs-check, markdownlint and actionlint.
  • Navigation: screen tests and census of the three interfaces, the audit of the web pages in a browser, and the end-to-end tests of the desktop.
  • Environments: unit tests against stand-ins of wsl.exe and docker that run the wrapper and scripts with real shells; the integration test with real Docker containers, locally and in CI; the integration test with a real WSL distribution in CI only; screen tests and census of the desktop, the phone and the web interface (audit of contrast, type scale and target sizes).

Not verified yet

  • Windows was only cross-compiled here, and macOS not at all: CI covers their tests, census and the WSL test. Whether the packaged (MSIX) application can run wsl.exe was not tried.
  • The activation commands were not run in each shell.
  • The online directory against GitHub itself, and the reusable workflow from a plugin repository: both need this on main.
  • The phone app was seen in the screen tests only, not on a device; the new steps of measure-apk run on an emulator for the first time in CI.
  • The pictures of the README and the user guides show the interface from before.

vfox doctor exits with 1 when a finding is an error, with the report on standard
output all the same. The application took any other exit code than 0 for a
failure, and it runs vfox outside of an activated shell on purpose, which vfox
1.1.0 reports as the error path.not-activated: the health check of the home page
failed with the real vfox, showing "}" as its message.

Read the report whether vfox exits with 0 or 1, and leave out what it finds
about the process that asks. The captures gain the answer of vfox outside of an
activated shell, the fake vfox gives it, and the end-to-end test against the real
vfox checks the home page for it.
The home page of every interface said to add the Bash line to ~/.bashrc, also on
Windows. It now offers the shells of the machine that runs vfox (Bash, Zsh, fish,
PowerShell, Nushell and Clink), the person's own first, with what to do for the
chosen one. The inventory of the remote API carries them to the web interface and
the phone app.

In the web interface, also: draw the settings icon while the settings are open;
use the menu icon for the rail and move its add button to the top; name each page
once, and say so when the page reconnects instead of showing a status dot; leave
a gap between the items of segmented lists; and give plugins the avatars of the
desktop, shapes of the Material library picked by the same hash.
The desktop showed every value at its target at once, whatever the platform
asked. Its springs now move by default, and a new Animation setting chooses
between following the system, moving even when the system asks for less motion,
and not moving. Page transitions stay off: their layers cost memory. Dialogs and
menus grow in under the full setting too, on a value of their own, as mygo takes
poses to their target at once while the system asks for less motion.

The springs take about 9 MB more memory on the list of versions
(docs/en/dev/memory.md).
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Memory use at 76d5f08

  • No change from main beyond the noise of CI in mygo.
Implementation Technology Processes Home PSS Home RSS Versions PSS Versions RSS The list adds (PSS)
mygo mygo 0.9.0, Go 1.27.4, GTK 3 (purego), CPU renderer 1 50 (+2) 63 55 (+3) 70 +5

In MB, for the application and all of its child processes, sorted by the PSS of the Home page; "Versions" is the SDKs page with the available versions of Node.js listed. A number in parentheses is the difference from main, in bold when it is more than the noise of CI. "(main)" marks an implementation that this pull request did not rebuild: its numbers are those of main.

Lightweight mode

What the application uses with the web interface on and its window closed, with the fake vfox, in MB for the application and all of its child processes: lightweight-idle is settled with no browser, lightweight-loaded with a paired browser past its first inventory over server-sent events (vfxtool measure-lightweight). A change is judged by the private memory, the heap and the stacks, and only by a difference of more than the larger of 2 MB and 5 % of main. The resident and the proportional memory include the pages of files that the system takes back, so they are shown without a judgement.

Measure This pull request Main
Idle RSS 50 MB (+2) 48 MB
Idle PSS 37 MB (+2) 35 MB
Idle private memory 14.9 MB (+0.8) 14.0 MB
Loaded RSS 52 MB (+2) 50 MB
Loaded PSS 39 MB (+2) 37 MB
Loaded private memory 15.0 MB (+0.8) 14.2 MB

Phone app

What the release APK uses cold-started on an emulator, in MB from dumpsys meminfo after settling: apk-cold. Emulator boots vary, so only differences of more than 5 MB and 10% count as changes.

Measure This pull request Main
Cold RSS 142 MB (main) 142 MB
Cold PSS 48 MB (main) 48 MB
Details
  • Measured by vfxtool measure in the workflow of the implementation, on a GitHub-hosted runner with Xvfb and no GPU. These are not the numbers of docs/en/dev/memory.md, which come from another machine: compare the rows of one comment.
  • The same code does not use the same memory in every CI run, so a difference counts as a change only when it is more than 5 MB and more than 5% of the number on main.
  • Runs of this pull request: mygo.
  • Latest runs on main: mygo (29ebaf0).

@linghengqian linghengqian added enhancement New feature or request bug Something isn't working labels Nov 27, 2026
The window listens to what the pages show and asks for a frame when it changes,
but not to the health check. A check that ended after everything else had loaded
left the home page saying that it was still checking until something else drew a
frame. The end-to-end test against the real vfox showed it in the sandbox of CI.
The floating label of a text field changed its font size in every frame of its
spring, 25 sizes in one move. The libraries that draw text, and the glyph atlas of
the toolkit, keep what each size needs: after a few dialogs with a field the
application held about 8 MB more of C memory and 4 MB more of Go heap. The label
now moves in its two sizes, drawn at the larger one and scaled in between.

The application also frees what drawing grew the Go heap by, two seconds after
the last frame.

Under Xvfb, after five dialogs and every page, the application takes 63 MB of PSS
with motion, where it took 76 MB, and 62 MB without motion.
measure-apk fails when the log of the device shows a crash, and took every error
of the Android runtime for one of the app. uiautomator, which reads the screens
for the tool, fails now and then on the emulator of CI with a timeout while it
connects, and its crash failed the run. Errors of its processes are left out now.
What the application knows about particular plugins was Go code, so adapting a
plugin, or a new release of one, needed a release of the application. The
profiles of the 20 plugins are now JSON files (shared/profile/plugins, with a
schema), whose format 2 adds parts for some platforms, version names read by
regular expressions, filters that match a pattern, and switch and text
variables.

For an installed plugin, each section of a profile comes from the first of the
user's files, the profile that the plugin ships as lib/vfox-plus.json, the online
directory (this repository's main, at most once a day, checked by SHA-256), the
files of the application, and inference. A profile may not set variables that
change what runs, its links and preset addresses are https only, and the
interfaces ask before they set a value that the application did not ship. Detect
and link is offered only for plugins that can detect.

vfxtool profile lints profiles, for plugin repositories through a reusable
workflow too, and indexes the online directory. A setting inferred from a plugin
that takes text can be set now, and the filters inferred for a profile that
declares none filter the list.
The format of the profile files, where they come from and what they may not do,
in English and Simplified Chinese, with the changes of the web API, the
interface specification and the user guide.
@linghengqian linghengqian added this to the 1.0.0 milestone Nov 28, 2026
@linghengqian linghengqian changed the title Fix the health check, show how each shell activates vfox, fix the web interface and animate the desktop Rework how vfox+ presents vfox: fixes, motion and plugin profiles Nov 28, 2026
@linghengqian
linghengqian marked this pull request as draft November 28, 2026 17:02
vfox-plus now manages vfox in each environment on its own: the computer, every
distribution of WSL and every development container that Docker has, on the
computer or in a running distribution (core/env). Looking for them changes
nothing; only Start starts one, and a distribution that the person started stays
started, although WSL stops idle ones. Commands run through a shell wrapper
that keeps values off command lines and ends them on cancel. A vfox older than
1.1.0 is read only. Each environment has its own settings and task lane; the
remote API gains /api/environments and routes per environment, and the desktop,
the web interface and the phone app switch between them.

The Windows application is a program of the window subsystem now, and opens no
console window for the programs that it runs.

CI runs the real vfox in development containers and in a distribution of WSL.
@linghengqian linghengqian changed the title Rework how vfox+ presents vfox: fixes, motion and plugin profiles Rework how vfox+ presents vfox: fixes, motion, plugin profiles and environments Nov 29, 2026
Comment thread mygo/core/files.go Fixed
Comment thread mygo/core/vfox/pluginsource.go Fixed
A project is a folder whose .vfox.toml names the versions that it uses: vfox+
reads it with the TOML library that vfox uses, asks vfox which versions it puts
in effect there, and installs the missing ones. Installed versions carry what
vfox lists about them (links, copies and aliases), and the SDKs that a plugin
finds on the machine can be listed without linking them.
/api/projects lists the projects of an environment with what vfox says of
each, adds those that the computer suggests and forgets them, and
/api/projects/install installs what is missing. The browser can use a version
in a listed project, and /api/sdks/<name>/detect lists the SDKs that a plugin
finds on the computer.
…ainer

The browser and the phone add plugins through a call that reads no file, and
name a project only to pick one that the application holds, whose own path it
then uses. Docker prints what it pulls beside the id of a new container, which
the integration test read as the id.
The navigation has four destinations. The overview says what runs, what needs
attention and what is in use; the projects show what each .vfox.toml asks for
and put the missing versions right; the toolchain lists the plugins, whose
button adds a version to download, one found on the machine or one by name, and
holds the registry. The tasks are reached from a dock under the other pages and
from the overview. Rows that hold buttons are list items that can be pressed, so
that assistive technology reaches the buttons.
The end-to-end scenarios, the screenshots and the memory measure follow the
pages of the desktop, and both scenarios of vfox check a project: the real one
installs what a project misses. The fake vfox answers current in a folder that
has a .vfox.toml.
The interface, the task dock, the routes and events of the projects, what vfox
says of a project and finds on its machine, and the TOML parser that reads a
.vfox.toml.
The Install button of the registry sends the name of the plugin as the source of
the add operation, which was refused as not a URL, so that no plugin of the
registry could be added from the web interface or the phone app. A name that the
registry lists is added with `vfox add <name>` now; any other source still has to
be a URL.
The web and phone interfaces read the inventory again on every change that
they are told of, and each read loaded a list that had failed again, which
told them of a change: a vfox that could not list its plugins, offline for
instance, was run without end. A failure younger than three seconds stays.
The web interface has four destinations now: an overview of what goes on and
needs attention, the projects of the environment with the versions that their
.vfox.toml asks for, the toolchain with the installed plugins, and the
settings. The versions to download and the plugin registry are pages of the
toolchain, installs that a plugin finds on the computer can be linked, and a
dock at the bottom of the pages says what runs and leads to the list of the
tasks. The earlier addresses lead where their pages went.

The pages are drawn with lit-html, which puts every value of the computer and
of vfox into the page as text, and keeps the elements that stay. Pages change
with the View Transitions API on the spring curves, with a plain animation
where a browser lacks it and none for a person who asks for less motion.

webheap opens the new pages with -tab, and its scenes click the new page.
The refresh button of the projects answered with what vfox had said before, so
that a .vfox.toml changed by hand did not show until a task ran. The protocol
also documents adding a plugin of the registry by its name and the pause before
a failed list is read again.
The client of the phone lists the projects of an environment, adds those that
the computer suggests, forgets them and installs what they miss, lists the SDKs
that a plugin finds on the computer, uses a version in a listed project, reads
what vfox says of installed versions besides their names, and learns of changes
of the projects from the events.
The page of an SDK on the phone has "Add version" as its main action, a split
button filled with the primary colour as on the desktop.
A snack bar keeps above the navigation bar of a narrow window only, so it lies
over the dock of the tasks that the phone shows at the bottom of its pages. A
window can now say how much room it keeps there.
The bar of the tabs has the overview, the projects, the toolchain and the
settings. The overview shows what runs, what needs the person (projects that
miss versions and the health check), the versions in use, the card of the shell
and the last tasks. The projects tab lists the projects and the folders of
development containers, and the page of a project installs what it misses, uses
an installed version and adds a tool.

The toolchain lists the plugins and opens the registry as a page. The page of an
SDK has the button "Add version", which opens the versions to download as a page
and offers to link one on the computer or install one by name, its versions say
how they are used and what they are, and a plugin without a version lists what it
finds on the computer.

A dock at the bottom of the pages says what runs and the failures that were not
seen, and opens the list of tasks, which is a page now, so starting a task no
longer moves to another page.
The tool visits the four tabs, opens the page of an SDK from the toolchain and
updates its plugin, opens the registry and the dialog that adds a plugin, takes
the overview in the dark theme, and opens the list of tasks from the overview,
swiping the page up to its button. What is scrolled above the screen has
negative bounds in the accessibility tree, which the tool now reads. The dark
picture of the home page is now android-dark-overview, and the pictures of the
tabs are android-overview, android-projects, android-toolchain and
android-settings.
A computer with an older vfox+ has no projects to add one to, so the projects
tab shows no button for it while it cannot read them. A test checks that the
room of the snack bars above the dock does not keep the window drawing.
The message of a whole view scrolls at large text sizes, as the room above the
dock does not hold it, and the buttons of the header of a project go under its
name before the name is broken. A project that cannot be read says so, and
removing one from the list has a cross and no danger colour, as its files stay.
A test draws the pages as a phone shows them, under the bar of the system.
A task that works in the folder of a project says it, so that the web and phone
pages show the use of a version in the project that asked for it. The projects are
being read, not without a .vfox.toml, while vfox is probed. The phone's refresh
has the computer read the files again, and the answer of a change of its settings
stays with the environment that it was made in.
@linghengqian linghengqian changed the title Rework how vfox+ presents vfox: fixes, motion, plugin profiles and environments Rework how vfox+ presents vfox: fixes, plugin profiles, environments and navigation Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants