Configured terminal workspace manager for the dashboard #423
Labels
No labels
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#423
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
iwpicks its terminal workspace manager by reading the environment of theterminal it was invoked from:
HERDR_ENV=1selects herdr, otherwise tmux(IW-422). That works for the CLI and cannot work for the dashboard.
The dashboard is a long-lived server process with no invoking terminal, so
there is no environment to detect.
dashboard/jvm/src/CaskServer.scala:1264therefore calls
TmuxAdapter.createSessiondirectly and is knowingly tmux-only,which IW-422 left in place deliberately. A worktree created from the dashboard
gets a tmux session even when the user works in herdr.
The server needs to be told which manager to drive.
Scope
A global setting that names the terminal workspace manager, and the dashboard
reading it.
IW_WORKSPACE_BACKENDin IW-422 — the same vocabulary, not a new one.the CLI uses, so the two stop diverging.
WorktreeCreationError.TmuxErroris renamed once the path is no longertmux-only.
Depends on IW-422, which introduces the port (
TerminalWorkspaceOps), the twoadapters, and the selection rule this setting feeds.
Design notes carried over from IW-422
IW-422's selection rule is deliberately shaped to take a second input. Its
precedence is:
IW_WORKSPACE_BACKEND, when set to a recognised nameHERDR_ENV=1-> herdrWhere the configured default sits relative to environment detection is this
issue's decision, not IW-422's. The CLI case argues for detection winning (you
are literally inside herdr); the server case has no detection at all, so the
setting is its only input.
IW-422 also requires that the selection rule and
isInsidestay separatefunctions precisely because this issue makes them diverge: once a configured
default exists, "which manager do we drive" and "are we inside one of its
workspaces" are no longer the same question, and the attach path stops being
unreachable.
Acceptance