WIP: feat(dashboard): a local page of sessions, PRs, the queue, disk and workspaces #26
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Tooling!26
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Tooling:feat/dashboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Someone working on Longshot with several agents at once has no single place to see what is going on: which session holds which worktree and which ones nothing holds any more, their PRs and whether they still merge, what the job queue runs and why it waits, results, disk use and stale locks. This is a local page for that:
python -I -B dashboard/serve.py, then http://127.0.0.1:8765 (it listens on 127.0.0.1 only).This is a WIP push of the working prototype so it can be worked on together, not a PR to review for merge yet. It is the prototype as it runs on one Windows PC, copied in as it is, with one change: it finds the workspace from Tooling's clone, or from
MAGICBEAN_WORKSPACE.dashboard/MIGRATION.mdis the plan from here to Tooling's shape, as about ten smaller PRs (the first, the Windows fix toworkspaces.recent_mentions, is #25). This one will be split up along that plan or closed once the pieces exist.What is in it (
dashboard/README.mdhas the details and the rules behind each flag;dashboard/OVERVIEW.mdis the write-up):forge.py's sign-in, only on Refresh (nothing polls), plus conflicts from a local trial merge.dev.py queue,status --jsononce Longshot #1852 is in): running, waiting and why, slots, moving a job.Standard library Python 3.8+ and one HTML page, no build step, no Node dependency at run time.
Testing
Tested: Windows 11, the server from this branch: the page and
/api/overview,/api/queue,/api/locks,/api/prsall answer (200). The prototype has been in daily use on that PC since 2026-11-19: the actions' end-to-end script, checks requests run for real for Longshot and Tooling, a launcher compile. Not run on Linux yet.Checks:
tests/run_all.pygives the same result as onmain(6 of 8;test_workspacesfails on Windows onmaintoo, fixed by #25, andtest_releasefails there too). The dashboard's own tests (dashboard/tests/) are scripts against a running server and a Node render test, not yet offlinetests/test_*.py: that is step 7 of MIGRATION.md.Still to test:
Measurements
Nothing to measure yet for a WIP prototype. On the PC it runs on: the PRs tab answers in about 0.5 s warm, the Work tab in about 7 s cold (session transcripts).
Risks
None to Tooling: a new folder, nothing else in Tooling changes or imports it. It runs only when started. Its actions remove worktrees and lock files only after a plan the user confirms.
state/(caches, notes) and the copied fonts are ignored, not committed.What is not done (for whoever picks a piece up)
<workspace>/src/...,<workspace>/longshot/...) is built in, in about 45 places.--demomode for screenshots, a run on Linux.🤖 Generated with Claude Code
Recommendation: Request changes. The dashboard can change or remove work that another session is using, and its advertised build and measurement paths are not yet reliable. Its fixed workspace model and missing offline checks also prevent it from working as a shared Tooling feature.
The page could consolidate session, queue and PR information, but the current prototype trades that convenience for unsafe workspace actions, broken build recipes and potentially misleading A/B results. The migration plan is a sensible direction; the individual pieces need these safeguards before merging.
Does it help: Unproven. The author reports Windows endpoint responses, daily prototype use and approximately 0.5 s warm for PRs and 7 s cold for Work; these do not establish that the requests, cleanup and measurements work across supported setups. This is not a performance optimization.
Other systems: Windows and Linux share destructive actions and the queue; Linux has not been run. Requests affect Longshot and Launcher builds, shared bases and timed runs; current recipes use removed Longshot commands. Existing environment-configured stores can be redirected. No game, audio, input or save compatibility was established.
Switches: MAGICBEAN_WORKSPACE defaults to a parent inferred from Tooling; MAGICBEAN_TOOLING defaults to the checkout. Those defaults assume the prototype layout, not the documented sibling-checkout layout. The server also overrides LONGSHOT_DEV_HOME, LONGSHOT_OBJ_STORE, LONGSHOT_LIFT_STORE, LONGSHOT_LAUNCHER_HOME, TEMP and TMP for its children; this is not appropriate for existing configured setups. Queue settings are editable with existing defaults supplied by Longshot; their safe behavior is not established. A/B forces HOS_FPS_MAX=1000.
Reviewed:
1f39e026beagainst0b0059acd2: Head1f39e026beagainst0b0059acd2: read repository rules, migration, overview and README; server, Python libraries, recipes, generator and dashboard tests in full. Read index.html and start.cmd; app.js output was truncated, so only its first portion was read. CSS, theme and remaining JS were not read; aggregate diff was truncated. No code was run. No PR template or review checklist was found at the named paths.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
Testing: Author reports Windows 11 endpoint smoke tests, real checks requests, a launcher compile and action script; 6 of 8 repository checks pass with two reported baseline failures. Linux, the build/game recipes and isolated offline dashboard tests remain unverified. Nothing was run for this review.
Overlaps and merge order: Tooling #25 fixes Windows workspace mentions and is planned first; use its shared detection after it lands. Longshot MagicBeanDev/Longshot#1852 supplies the queue interface and should precede the dashboard's integration with it.
Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.
@ -0,0 +20,4 @@| Dependencies | standard library; Python 3.8 syntax as far as a scan shows | the same: test on a 3.8 || Paths | **the personal workspace layout is built in** (`src/`, `src/working/`, `longshot/{dev,builds,logs,store}`, `analysis/`, `dashboard/state`): about 45 places | Tooling's own model: the checkouts **beside** Tooling (as `workspaces.py` finds them), the dev folders from the environment or the workspace file, its state in the config folder (`%APPDATA%\Longshot\dashboard`, `~/.config/longshot/dashboard`) unless the workspace file names another || Workspaces | git worktrees under `src/working/` | the team works in **jj workspaces** beside the repository (`../Longshot-<topic>`, `workspaces.py`): both, with jj first || Session detection | its own reading of transcripts (`lib/sessions.py`: edits and commands only) | **`workspaces.recent_mentions`**, once it works on Windows (see the first PR), so both tools agree |The dashboard has no offline tests in tests/run_all.py, which Tooling requires with the change. Add behavioral coverage for these paths and safety checks before merging.
@ -0,0 +263,4 @@if live:return {"ok": False, "why_not": "a job is working in it: %s (pid %s, dev_packs.busy)" % (live[0]["what"], live[0]["pid"]),"steps": []}users = _users(p)The probe does not hold the lock during deletion, and unknown is accepted. A build can take the lock immediately afterward; hold the actual lock throughout deletion and preserve its file.
@ -0,0 +25,4 @@NO_WINDOW = 0x08000000 if WINDOWS else 0 # (CREATE_NO_WINDOW: no console flashes for git and powershell)# (the workspace's saved variables, set here so a server started from an old shell never builds with stale ones)ENV = {These values overwrite an existing configured dev home and stores for all spawned commands. On a different layout that splits shared state and potentially the queue; respect workspace configuration and environment precedence.
@ -0,0 +93,4 @@jq = c.job_queue()jobs = jq.read_tickets(jq.queue_dir(jq.settings()), clean=False)except Exception:passAn agent can work in this tree from another cwd, and a queue read failure here becomes an empty job list. Both can make deletion appear safe; treat active work mentions and unknown queue state as blockers.
@ -0,0 +127,4 @@chosen = os.path.join(c.SRC, "working", os.path.basename(repo).lower(), args.get("folder") or "%s-pr" % args.get("pr"))if os.path.isdir(chosen):code, out, _ = c.run(["git", "-C", chosen, "status", "--porcelain"])if code != 0 or out.strip():This fallback moves an existing clean worktree without checking its users. A second request after a PR push can change an active agent's checkout; reserve request-owned worktrees and check usage before moving them.
@ -0,0 +127,4 @@if kind != "compile":out["outputs"].append(rt)rid = "{id}"if kind == "checks":These recipes still invoke dev_build.py, which the README says current Longshot removed. Port to the supported provider/commands or block these requests until they work.
@ -0,0 +37,4 @@def run_teleport(run, st):t = ctl(run, "teleport", str(st["to"]), "--arrive", "90", check=False)ctl(run, "wait", "loading_end", "--timeout", "120", check=False)A failed teleport or load is ignored, so the next measurement can be from the previous scene but reported under this label. Fail on bridge errors and verify arrival before collecting samples.
@ -0,0 +30,4 @@bad = Falseshutil.rmtree(BASE, ignore_errors=True)This removes a fixed path in the real dev bases even if it already exists. Use a unique isolated fixture and never remove pre-existing data.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.