Skip to content

One look, and a way back out of a site - #78

Merged
sotashimozono merged 1 commit into
mainfrom
one-look
Sep 15, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
one-look

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Two complaints. The first: the dashboard and a directory on a host were a light card UI and a dark file explorer that happened to share a suffix.

They now share a palette

dashboard.css had four colours of its own — hex values no scheme had a say in — so choosing a dark theme turned the daemon's pages dark and left the dashboard white. Those are gone. Every colour in it is a var(); the theme supplies --bad and --good from base08 and base0B, which is what every base16 scheme paints an error and a string in; and the palette arrives inline from the daemon and over /_control/theme in the extension.

Relayed rather than reconstructed: sixteen hex values copied into TypeScript would be a second place for a theme to be wrong, and only one of them would be the one anybody had looked at.

Two smaller seams closed with it:

  • the background moves to html, where the listing's stylesheet already put it — on body the colour stops at the content box and a short page shows the browser's white below the fold;
  • the dashboard asks for the palette on connect, not only on the settings view, which is where this first lived and where almost nobody goes.

And a way back

From inside panza.ssh-browser there was no route to the list of sites. It is a different origin, so the back button is the only one and only if you arrived by it. Every directory page now carries all sites in its header.

Pages that are somebody's file get nothing added to them. That is the line this must not cross, and does not.

Found while wiring it

The service worker names the fields it relays one at a time — which is what keeps a page from being handed whatever the daemon happens to add — so the palette reached getTheme and stopped there. The e2e caught it as rgb(0, 0, 0) against themed text, which is the only place that could have.

Checks

Two: the two pages resolve to the same background and foreground, and a directory says where the list of sites is. Compared as resolved colours rather than as CSS text, because what matters is what the pages became.

230 tests, 65 e2e checks against a real host, fmt/clippy/tsc/permission-pin clean.

Two complaints, and the first was that the dashboard and a directory on a host
were a light card UI and a dark file explorer that happened to share a suffix.

They now share a palette. `dashboard.css` had four colours of its own, written
as hex values no scheme had a say in, so choosing a dark theme turned the
daemon's pages dark and left the dashboard white. Those are gone: every colour
in it is a `var()`, the theme supplies `--bad` and `--good` from base08 and
base0B -- which is what every base16 scheme paints an error and a string in --
and the palette arrives inline from the daemon and over `/_control/theme` in the
extension. Sixteen hex values copied into TypeScript would be a second place for
a theme to be wrong, and only one of them would be the one anybody looked at.

Two smaller seams closed with it. The background moves to `html`, where the
listing's stylesheet already put it: on `body` the colour stops at the content
box and a short page shows the browser's white below the fold. And the dashboard
asks for the palette on connect rather than only on the settings view, which is
where this first lived and where almost nobody goes.

The second complaint: from inside `panza.ssh-browser` there was no way back to
the list of sites. It is a different origin, so the back button is the only
route and only if you arrived by it. Every directory page now carries "all
sites" in its header. Pages that are somebody's file get nothing added to them,
which is the line this must not cross and does not.

Found while wiring it: the service worker names the fields it relays one at a
time -- which is what keeps a page from being handed whatever the daemon adds --
so the palette reached `getTheme` and stopped there. The e2e caught it as black
text against themed text, which is the only place that could have.

Two checks: the two pages resolve to the same background and foreground, and a
directory says where the list of sites is. 230 tests, 65 e2e checks.

Signed-off-by: Souta <shimozono-sota631@g.ecc.u-tokyo.ac.jp>
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ssh-browser/src/origin/mod.rs 83.33% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@sotashimozono
sotashimozono merged commit 7896930 into main Sep 15, 2026
20 checks passed
@sotashimozono
sotashimozono deleted the one-look branch September 15, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant