Skip to content

Redraw the application icon as the vfox fox, make the web interface installable, draw the diagrams in Mermaid - #40

Merged
linghengqian merged 10 commits into
mainfrom
feat/fox-icon-mermaid-diagrams
Oct 29, 2026
Merged

linghengqian merged 10 commits into
mainfrom
feat/fox-icon-mermaid-diagrams

Conversation

@linghengqian

Copy link
Copy Markdown
Member
  • Redraw the application icon as the vfox fox, make the web interface installable, draw the diagrams in Mermaid.

The old icon was a "v+" on an orange cookie. The new one is the fox of
the version-fox avatar in Material 3 Expressive shapes: an orange fox
head with cream cheeks on an indigo plate, with the 9-sided cookie of the
shape library as a soft halo. Measured on the drawing, the fox has at
least 3.2:1 against what is behind it (WCAG asks 3:1 for graphics), and
on Android it stays inside the 66 dp safe zone of the adaptive icon.

- Linux: dev.vfox.VfoxPlus.svg is the master, with an id on every path.
- Android: ic_launcher_background and ic_launcher_foreground are the
  full-bleed plate and the fox; the new ic_launcher_monochrome (cheeks at
  half strength, eyes and nose cut out) serves the themed icons of
  Android 13, which used to get the white glyph. ic_mark is the master as
  a vector drawable. The background colour resource is gone.
- Windows: the MSIX logos were a placeholder drawn with lines. appicon
  draws the same paths with golang.org/x/image/vector (BSD-3-Clause),
  with the icon centred in the wide logo. Its tests compare the paths,
  the colours and the transforms with the SVG and the four drawables, so
  that a change of one of them without the others fails.
- Docs: the section "Application icon" of the design system, the new
  dependency, and the packaging pages.
The text-art diagrams looked rough, and in the Chinese documents the
double-width characters broke their alignment. They are Mermaid blocks
now, which GitHub renders, in one theme (the colours of the icon) that
reads on the light and the dark page, each with an accTitle and an
accDescr for screen readers.

- Architecture: the layers, and the repository layout as three bands of
  cards instead of a tree.
- Fixtures: the layout of a fixture directory with what writes it and
  what reads it.
- Remote protocol: the task life cycle as a state diagram, including
  the cancel of a queued task that the endpoint table already described.
- Contributing: how to draw a diagram.

Only the samples of real vfox output keep their box characters. Every
diagram was rendered with Mermaid 11.17 and 12.2 on a light and a dark
page.
The pages of the pairing server showed the default icon of the browser in
every tab. They carry the fox now: the plate and the fox of the
application icon without the halo, and with a larger fox, which still
reads at 16 px (favicon.svg).

- The SVG is inlined into the pages as a data URI, the way the page
  already inlines its other assets, so the server answers no request for an
  icon and /favicon.ico stays a 404. The URI has no comment, no
  declaration, single quotes and only the characters that HTML or the URL
  parser would take for their own escaped; it is about 3.3 KB.
- The intro page, the page that confirms a pairing and /app all take it
  from a placeholder in their head. The web interface is written in three
  parts around the placeholder, so that serving it copies nothing.
- Tests: the escaping, the paths and the gradients of the favicon against
  the master SVG (a change of one of them without the other fails), the
  placeholder, and the three pages as the server sends them.
- Docs: the favicon in the table of the application icon, and in the
  inlined assets of the web interface.
The section about the shared server, the desktop, service, serve and pair
was dense prose. A flowchart now shows what the two commands do when a
shared server is live and when none is: pair mints a link from it or
starts a one-shot read-only snapshot server (it refuses when the service is
disabled), a loopback serve attaches or starts its own model and registers
it, and a serve on another interface always starts its own HTTPS server,
and it needs --allow-remote. The desktop (with Remote access on), service
start and a loopback serve are the three ways to be the shared server that
server.json records, and browsers and the Android app pair with whichever
server answers.

Every branch follows pair/command.go, serve.go, service.go and
servicecmd.go. The diagram was rendered with Mermaid 11.17 and 12.2 on a
light and a dark page, in English and in Chinese.
The READMEs had no picture of the application. They show the icon now,
centred above the title, from the master SVG of the repository
(shared/packaging/linux/dev.vfox.VfoxPlus.svg) instead of an image on an
image host, so that the icon on the front page is always the icon that
the packages ship. GitHub keeps the centring, the size and the alt text.
Software centres draw the icon of an application on an accent colour, which
the metainfo can name with <branding>. It names a light and a dark one, the
primary containers of the colour scheme of the vfox orange (#FFDCC1 and
#6B3B04, the --m3-primary-container of the web interface): the indigo
plate of the icon stands out from the warm colours, and the text on them
keeps its contrast.

appstreamcli 1.1.2 (Ubuntu 26.04, as in CI) validates the file and
parses the element: it shows the colours in the DEP-11 output, and it
rejects an invalid colour, an invalid scheme, a duplicate and an unknown
type. lintian --fail-on error, run the way CI runs it, accepts the .deb that
vfxtool build-deb makes with it.
Chromium browsers can install the web interface as an application if it
has a web app manifest, and the manifest can name an SVG icon, so that the
icon needs no PNG. In Chromium (manifest_icon_selector.cc) the types that
count for installing are PNG, SVG and WebP, and an icon of the size "any"
meets the minimum of 144 px. Chromium 156 against the real server agrees:
the manifest has no parse errors, getInstallabilityErrors answers none, and
the primary icon it makes for the install is a 144 px PNG that it
rasterized from the SVG.

- GET /manifest.webmanifest serves the manifest: name and short_name
  vfox+, id and start_url /app, scope /, standalone, the colours of the
  page, and one icon, the favicon as an SVG data URI of the size "any".
  It needs no session, because it names only the application and its start
  page, and a browser may process a manifest without the page that links it.
  webapp.html links it.
- The navigation rail of the web interface still showed the old "v+" in a
  tile. It shows the icon now, from the same data URI: a second placeholder
  in the page, which is written in pieces around the two placeholders, so
  that serving it still copies nothing. The tile and its shape morph are
  gone, the icon has its own plate.
- Tests: the manifest and its colours against the page, the route (public,
  GET and HEAD only), the icon of the manifest equal to the favicon of the
  page, the brand mark, the pieces of the page. Each fails when its part is
  broken: the size of the icon, the route, the old mark.
- Docs: the manifest in the remote protocol, the architecture and the
  design system, and a note in the user guide for Chrome and Edge (the
  machine itself, or HTTPS with a certificate they trust).
The screenshot in the remote guide (docs/zh-CN/user/remote.md) showed
"Plugins" in English on the button of the plugin registry, in an
interface that is Chinese otherwise. It was added with the merge of #39
but taken from an earlier state of the page: the source of that merge
already translates the button (exploreBtn).

Rendered again the way docs/en/dev/contributing.md describes (the headless
server over the fixtures of the fake vfox, webheap/check.cjs, the phone
portrait of 412 by 915), the new picture differs from the old one in that
button only: 1106 pixels, inside a box of 64 by 40. Two renderings are
identical byte for byte. The picture is on freeimage.host, and the copy
downloaded from there matches the local file byte for byte.

The English screenshot stays: rendered the same way, it is identical byte
for byte to the one that the guide links, so there is nothing to upload.
Neither picture shows the brand mark of the web interface, by the way: at
this width the navigation rail that carries it is hidden and the bottom bar
takes its place.

chrome-headless-shell 156 gives the exact size. A windowed Chrome for
Testing 156 in --headless=new mode answered --window-size=412,915 with a
picture of 500 by 715.
… 715

The recipe for the screenshots of the remote guide passes --window 412,915
and "$(which google-chrome)", and promises the phone portrait. Not every
Chrome keeps a window that small: rendering the pictures again, Chrome for
Testing 156 answered it with a picture of 500 by 715, and chrome-headless-shell
of the same version gave exactly 412 by 915.

The guide now says to look at the size before uploading (an upload of an
anonymous image cannot be taken back) and to pass chrome-headless-shell with
--chrome when the size is wrong, in English and in Chinese.
@linghengqian linghengqian added the enhancement New feature or request label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Memory use at 89c51a3

  • 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.6.3, Go 1.27.3, GTK 3 (purego), CPU renderer 1 45 (0) 59 53 (-1) 68 +8

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.

Headless server

What vfox-plus-serve serve uses on loopback with the fake vfox, in MB for the server and all of its child processes: serve-idle is settled with no browser, serve-loaded with a paired browser past its first inventory over server-sent events (vfxtool measure-serve).

Measure This pull request Main
Idle RSS 12 MB (+1) 11 MB
Idle PSS 10 MB 10 MB
Loaded RSS 13 MB 13 MB
Loaded PSS 11 MB 11 MB

Web client heap

What the paired /app page uses in headless Chrome through the Chrome DevTools Protocol, in KB: app after the SDK list settles, app-settled after twenty seconds idle on the open page with live events (shared/tooling/webheap/check.cjs).

Measure This pull request Main
App heap 7540 KB (+3402) 4138 KB
App heap settled 2203 KB (-897) 3100 KB

Android client

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 159 MB (+7) 152 MB
Cold PSS 36 MB (+4) 32 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 (5e83610).

The "mygo" job of the Sandboxes workflow failed in its check task, in
TestMatchesAndroid of shared/tooling/internal/appicon: the test did not
find android/app/src/main/res/drawable/ic_launcher_background.xml in a
parent directory.

The test compares the drawing of the icon with the vector drawables of
the Android app, which it looks up from the directory of the test
upwards. The sandbox runs the tests of shared/tooling in a copy of the
repository that copyRepository makes, and the copy holds shared/, docs/,
LICENSE and the directory of the stack, but not android/. The jobs of
mygo.yml and repository.yml run these tests on a full checkout, where
they pass, and so does a run on the host: only the copy of the sandbox
lacks android/.

copyRepository copies android/app/src/main/res as well. Only that: the
rest of android/ holds Gradle outputs on a host that has built the app,
which a copy of the whole directory would carry into the container.
@linghengqian
linghengqian marked this pull request as ready for review October 29, 2026 06:39
@linghengqian
linghengqian merged commit 939b2f9 into main Oct 29, 2026
14 checks passed
@linghengqian
linghengqian deleted the feat/fox-icon-mermaid-diagrams branch October 29, 2026 06:40
@linghengqian linghengqian added this to the 1.0.0 milestone Oct 29, 2026
linghengqian added a commit that referenced this pull request Nov 22, 2026
vfox-erlang 1.2.3 refuses a space in the VFOX_HOME path of a source build, as it
already refused an apostrophe, a double quote, a dollar sign and a backtick. The
refusal comes after the source is downloaded and before configure starts, and it
names the character. The tip and both guides say so; they no longer say that a
space makes configure fail.

The contract now records the two names that the version-list check still skips on
Linux: master-latest, maint-latest and maint-<number>-latest, which fail at the
download (vfox-erlang #39). Other names that end in latest are checked (#34). A
tab in the path is not refused yet (vfox-erlang #40), and the guides do not
claim that it is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant