Skip to content

Split the web terminal into its own Fileglancer app - #15

Merged
mkitti merged 3 commits into
mainfrom
split-terminal-app
Aug 29, 2026
Merged

Split the web terminal into its own Fileglancer app#15
mkitti merged 3 commits into
mainfrom
split-terminal-app

Conversation

@mkitti

@mkitti mkitti commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #14 (which is stacked on #13, #12, #11).

Summary

  • Moves terminal-https/terminal-podman-https out of the root runnables.yaml into a new terminal/runnables.yaml, so Fileglancer offers "Marimo AI Sandbox" and "Marimo AI Sandbox - Web Terminal" as two independently addable apps instead of one bundled card. Confirmed directly against Fileglancer's own source (apps/manifest.py's _find_manifests_in_repo, the frontend's multi-app AddAppDialog): it discovers every runnables.yaml in a cloned repo and treats each as its own app -- no separate repo needed.
  • Runnable names now also state the backend explicitly (Apptainer/Podman), e.g. "Start Web Terminal (Apptainer, HTTPS)" instead of just "Start Web Terminal (HTTPS)", for consistency with the already-explicit "(Podman, HTTPS)" variant.

A real gotcha found and fixed while building this

Fileglancer runs a job from the directory containing whichever manifest it came from -- a manifest at terminal/runnables.yaml means the job's cwd is $FG_WORK_DIR/repo/terminal, not the repo root. And pixi run <path> for a path that isn't a declared pixi task name resolves that path against the caller's cwd, not the pixi workspace root -- verified directly: a declared task (e.g. terminal-https itself) runs with its cmd string's relative paths resolved against the workspace root, but a bare ad-hoc script path (container/terminal-wrap.sh) does not. So terminal/runnables.yaml's command: fields use ../container/terminal-wrap.sh, not container/terminal-wrap.sh -- the existing root-level runnables never needed this since their manifest already lives at the repo root.

Verification

  • pixi run --environment https ../container/terminal-wrap.sh ... run directly from within terminal/ (exactly what Fileglancer's generated job script does) -- confirmed it correctly finds and runs the wrapper, which correctly finds and runs ttyd inside the sandbox.
  • Both YAML manifests validated (yaml.safe_load).

Test plan

  • python3 -c "import yaml; yaml.safe_load(...)" on both runnables.yaml and terminal/runnables.yaml
  • Live end-to-end test of terminal/runnables.yaml's exact command form, invoked from within terminal/, against the real image

🤖 Generated with Claude Code

@mkitti
mkitti force-pushed the web-terminal-https branch from 6196ec0 to 9d3bca8 Compare August 29, 2026 01:39
mkitti and others added 2 commits August 28, 2026 21:39
Moves terminal-https/terminal-podman-https out of the root runnables.yaml
into a new terminal/runnables.yaml, so Fileglancer offers "Marimo AI
Sandbox" and "Marimo AI Sandbox - Web Terminal" as two independently
addable apps instead of bundling the terminal option into the Marimo
app's card. Fileglancer discovers every runnables.yaml in a cloned repo
and treats each as its own app (confirmed by reading fileglancer's own
apps/manifest.py _find_manifests_in_repo and the frontend's multi-app
AddAppDialog) -- no separate repo needed.

Runnable names now also state the backend explicitly (Apptainer/Podman)
per request, e.g. "Start Web Terminal (Apptainer, HTTPS)" instead of just
"Start Web Terminal (HTTPS)", for consistency with the already-explicit
"(Podman, HTTPS)" variant.

One real gotcha found and fixed while building this: Fileglancer runs a
job from the directory containing whichever manifest it came from (a
manifest at terminal/runnables.yaml means the job's cwd is
$FG_WORK_DIR/repo/terminal, not the repo root), and `pixi run <path>`
for a path that isn't a declared pixi *task* name resolves that path
against the caller's cwd, not the pixi workspace root (verified directly
against pixi's own behavior -- this is a real, confirmed distinction:
declared tasks like "terminal-https" itself DO run with paths resolved
against the workspace root, but a bare script path like
"container/terminal-wrap.sh" does not). So terminal/runnables.yaml's
command fields use "../container/terminal-wrap.sh", not
"container/terminal-wrap.sh" -- the existing root-level runnables never
needed this since their manifest already lives at the repo root.

Verified end-to-end: `pixi run --environment https
../container/terminal-wrap.sh ...` from within terminal/ (exactly what
Fileglancer's generated job script does) correctly finds and runs the
wrapper, which correctly finds and runs ttyd inside the sandbox.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mkitti
mkitti force-pushed the split-terminal-app branch from 5973eeb to f590bd9 Compare August 29, 2026 01:39
Fileglancer jobs cd to $FG_WORK_DIR/repo (the repo root), never into the
directory containing the manifest that defined them, even when that
manifest lives in a subdirectory (terminal/runnables.yaml here). The
manual `../container/terminal-wrap.sh` path was based on a wrong assumption
about this, verified only by hand-testing cwd from terminal/ directly
rather than an actual Fileglancer job. Confirmed live: fileglancer job 162
failed with "No such file or directory" launching
'../container/terminal-wrap.sh'. Fix to the same repo-root-relative path
the root runnables.yaml already uses for https-wrap.sh.
@mkitti
mkitti changed the base branch from web-terminal-https to main August 29, 2026 01:57
@mkitti
mkitti merged commit cab812b into main Aug 29, 2026
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