Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

test(preview): one anchor the e2e can read on both surfaces

Rahmanb1027cbf0b17
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 3945280f..56bd1298 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -21,6 +21,10 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
- `managed-apps` one-click install died, and installed apps read as "not installed", under systemd
- `install` bind loopback by default, and restart the service on re-run
+**Tests**
+
+- `preview` one anchor the e2e can read on both surfaces
+
**Docs**
- `readme` the update button, and what Preview actually opens
diff --git a/frontend/slices/media-viewer/components/remote-view.tsx b/frontend/slices/media-viewer/components/remote-view.tsx
index aa5c9297..11667392 100644
--- a/frontend/slices/media-viewer/components/remote-view.tsx
+++ b/frontend/slices/media-viewer/components/remote-view.tsx
@@ -96,7 +96,10 @@ export function RemoteView({ file }: { file: RemoteFile }) {
<AppFrame
className="bg-background"
header={
- <header className="flex items-center gap-2 bg-background/60 px-3 py-2">
+ // data-preview-file: which file is on screen, in one place on BOTH surfaces.
+ // The desktop wraps this in window chrome and the mobile shell does not, so
+ // an e2e that reads "the header" reads two different things; this reads one.
+ <header data-preview-file={current.name} className="flex items-center gap-2 bg-background/60 px-3 py-2">
<span className="min-w-0 flex-1 truncate text-sm font-semibold">{current.name}</span>
{paging && (
<span className="hidden shrink-0 text-[11px] tabular-nums text-muted-foreground sm:inline">