8000 Deck dies when you close the terminal it was started in (#29) by simon-inkie · Pull Request #56 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

Deck dies when you close the terminal it was started in (#29) - #56

Merged
simon-inkie merged 2 commits into
mainfrom
29-deck-survives-terminal-91csgr
Oct 11, 2026
Merged

simon-inkie merged 2 commits into
mainfrom
29-deck-survives-terminal-91csgr

Conversation

@simon-inkie
Copy link
Copy Markdown
Owner

Requested by Simon · project thread

Before: INSTALL.md starts Deck in the foreground, so closing that terminal stops it, and nothing restarts it.

After: INSTALL.md has a "Keep it running" section after "Build, and start", with two options: a detached tmux session, and an example systemd user unit, packages/deck/deploy/deck.service (Restart=always, optional EnvironmentFile=.env.production), plus the loginctl enable-linger step so it survives logout. Start on boot stays out of scope.

How: the unit has @DECK_DIR@ and @NODE_DIR@ placeholders that a sed in the doc fills in, because the clone can be anywhere and the launcher needs the right Node on PATH. The new blocks are tagged sh-manual, a language the rig now knows but doesn't run, since a container has no user systemd and a second Deck would clash on port 4242. The doc says so.

SPEC: .specs/29-deck-survives-terminal-91csgr/SPEC.md

Test plan

  • Rig self-test passes, and INSTALL.md block coverage is clean (no unclaimed or unknown blocks).
  • Tested by hand in an ubuntu:24.04 container booted with systemd, running the INSTALL.md blocks exactly as written as a normal user. systemctl --user start deck serves the empty-state page. Without linger, logout stops it. With linger, it still answers after logout. kill -9 gets restarted, and stop leaves no orphan process.
  • tmux block: Deck answers from a separate later shell, and kill-session stops it.
  • typecheck, boundaries, leaks, licence, lib-version and dashes are green, and the deck suite passes (2168). Two packages/base tests (create-agent "CANNOT VERIFY" and inbox.test.sh) fail the same way on main in my environment, so this change didn't cause them.

Follow-ups (not done here)

  • deploy.mjs defaults MC_SERVICE to inkie-deck.service, which doesn't match deck.service.
  • Get the rig to run the Keep it running blocks (needs a systemd container stage).

Closes #29

🤖 Generated with Claude Code

https://claude.ai/code/session_01MENiVGHvvhcyESwsAxyy4j


Generated by Claude Code

claude added 2 commits October 7, 2026 14:39
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Adds a Keep it running section to INSTALL.md with a detached tmux
session and an example systemd user unit, deck.service, plus the
loginctl enable-linger step. The rig learns a non-executed sh-manual
block language for commands a container cannot run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@simon-inkie simon-inkie self-assigned this Oct 7, 2026
@simon-inkie
Copy link
Copy Markdown
Owner Author

Review leg: Aggy (AI review agent). Verdict: ready to merge.
Checked: matches issue #29; documents both Option A (tmux detach, recommended for WSL) and Option B (systemd user unit); packages/deck/deploy/deck.service provided; rig plan updated; all CI checks pass; SPEC present and consistent; public-repo hygiene clean (UK English, no em-dashes).
Note: Supersedes earlier PR #48, which only covered systemd and had failing CI checks.
Merge decision stays with the maintainer.

@simon-inkie
simon-inkie merged commit 7fa380a into main Oct 11, 2026
4 checks passed
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.

Deck dies when you close the terminal it was started in

2 participants

0