You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a 6-slide first-run onboarding overlay to the GUI (Welcome, How It
Works, Safety Net, One Project at a Time, Token Usage, Ready to Go).
Uses localStorage to show once, dismissible via Skip/Get Started/Escape/
click-outside. Follows existing modal overlay pattern.
Add "One Session at a Time" section to README explaining the
single-session enforcement design (singleton guard + lock file).
Also includes pre-existing fixes: stdin-only prompt delivery in
claude.js (removes -p flag Windows mangling), gui/server.js tweaks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-**Long** (≥ 8000 chars): stdin `'pipe'`, write prompt + end
14
+
All prompts delivered via **stdin pipe** (never `-p` flag). On Windows, `shell: true` causes `cmd.exe` to silently mangle special characters in `-p` arguments. Stdin is binary-safe on all platforms.
styles.css # Dark theme CSS (extracted from dashboard-html.js)
111
111
logic.js # Pure functions (buildCommand, parseCliOutput, formatMs, etc.)
112
112
app.js # State machine + fetch API calls to server.js endpoints
@@ -265,7 +265,7 @@ NightyTidy creates these files/artifacts in the project it runs against:
265
265
-**Usage-limit resume**: When a rate limit is detected during an interactive CLI run, state is saved to `nightytidy-run-state.json` (same format as orchestrator mode). The user can close the terminal and resume later with `--resume`. The backoff schedule covers ~9.9 hours total (2min → 5min → 15min → 30min → 1hr → 2hr × 4). GUI's pause overlay includes a "Save & Close" button that exits cleanly for later resume.
266
266
-**Prompt integrity check**: `executor.js` computes SHA-256 of all step prompts and compares against `STEPS_HASH`. After editing any markdown file in `src/prompts/steps/` or `src/prompts/specials/`, recompute and update the hash in `executor.js`. Warns but does not block (user may have legitimate prompt changes).
267
267
-**`--dangerously-skip-permissions`**: Required for non-interactive Claude Code subprocess calls. NightyTidy is the permission layer — it controls what prompts are sent and operates on a safety branch.
268
-
-**Prompt delivery threshold**: Prompts longer than 8000 chars (`STDIN_THRESHOLD` in `claude.js`) are piped via stdin instead of passed as a `-p` argument. This avoids OS command-line length limits. If prompts fail with argument-too-long errors, check this threshold.
268
+
-**Prompt delivery via stdin**: All prompts are piped to Claude Code via stdin (never the `-p` flag). On Windows, `shell: true` causes Node.js to embed `-p` arguments directly in the `cmd.exe` command string, where special characters (`|`, `&`, `(`, `)`, `<`, `>`) get silently mangled. Stdin is binary-safe and immune to shell escaping on all platforms.
269
269
-**Env var allowlist**: `cleanEnv()` in `env.js` uses an explicit allowlist (system paths, locale, Anthropic/Claude/Git prefixes) instead of a blocklist. Unknown env vars are filtered out and logged via `debug()`. `CLAUDECODE` is explicitly blocked. Tests in `env.test.js`.
270
270
-**Branch guard**: `ensureOnBranch()` in `git.js` is called before and after every step execution in `runStep()`. If Claude Code switched to a different branch during a step, it commits any uncommitted work, checks out the run branch, and merges the stray branch back. On merge conflict, the merge is aborted (step work preserved on the stray branch). This prevents the "branch drift" problem where Claude Code creates its own branches, scattering commits across multiple branches.
271
271
-**Gitleaks CI scan**: `.github/workflows/ci.yml` runs `gitleaks/gitleaks-action@v2` on every push/PR to detect committed secrets.
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,15 @@ A full 33-step run is a serious workload — expect **6 to 8 hours** with Claude
50
50
51
51
Running fewer steps per session is a perfectly valid workflow — you'll get the same results, just spread over multiple nights.
52
52
53
+
## One Session at a Time
54
+
55
+
NightyTidy enforces single-session execution — only one improvement run can be active at a time, whether through the GUI or CLI. This is by design: running multiple concurrent AI sessions against the same codebase would create conflicting changes, broken merges, and unreliable results.
56
+
57
+
-**GUI**: A singleton guard ensures only one NightyTidy window can be open. Launching again focuses the existing window.
58
+
-**CLI**: An atomic lock file (`nightytidy.lock`) prevents concurrent runs. If a previous run was interrupted, you'll be prompted to override or resume.
59
+
60
+
If you need to run against multiple projects, use separate terminal sessions — the lock is per-project, not global.
61
+
53
62
## Desktop GUI
54
63
55
64
The GUI is the primary way to use NightyTidy. It wraps the CLI orchestrator in a five-screen visual workflow.
<p>Choose from 33 improvement steps — documentation, testing, security, performance, and more. NightyTidy runs each one through Claude Code and generates a detailed report of everything that changed.</p>
<p>Every run creates a git branch and a safety tag before touching your code. If you don't like the changes, one command undoes everything. Your main branch stays untouched until you're ready to merge.</p>
<p>NightyTidy runs one session at a time — don't open multiple windows for different repos. Finish one run before starting the next. This prevents conflicts and keeps everything clean.</p>
<p>A full 33-step run is very token-heavy. You'll almost certainly need the <strong>Max plan</strong> with plenty of usage left. If you're not on Max, run 8–10 steps at a time and wait for your limits to reset between batches.</p>
<p>Select a project folder, pick your steps, and let NightyTidy work overnight. If you hit a rate limit mid-run, it pauses automatically — you can resume later right where you left off.</p>
0 commit comments