Skip to content

fix(nexus): visual audit fixes - #36

Merged
Darknode-Official merged 1 commit into
mainfrom
fix/visual-audit
Nov 23, 2026
Merged

Darknode-Official merged 1 commit into
mainfrom
fix/visual-audit

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

Fixes for the Nexus visual audit (F1-F18). Desktop-app items A1-A3 are out of scope.

Fixes

  • F1: a thought that only repeats the final answer is not shown twice.
  • F2: every .nexus/ creation goes through ensureNexusDir (new lib/nexus/nexus-dir.js), which writes .nexus/.gitignore containing *. The project's own .gitignore is never edited.
  • F3: a file counts as written (footer, undo checkpoint, recap) only after a successful write. A run_command with a non-zero exit is a failed step. A denied command is not counted as "Ran 1 command".
  • F4: the loop-guard notice shows once, as a dim note inside the turn, worded for the user.
  • F5: failed or blocked writes no longer reach usage, the dashboard or the recap (same root cause as F3).
  • F6: an interrupted local turn ends flagged interrupted, with no "done" text.
  • F7: no recap for interrupted or empty turns, and only successful file changes are passed to it. On the local (ollama) engine, auto-recap is off by default unless the user has chosen a recap setting.
  • F8: /model <number> runs as typed. Argument completion lists prefix matches first and never matches a number inside a model name.
  • F9: ordered lists keep their numbers. Bold is painted before wrapping, so it carries across rows. List items get a hanging indent. Wrapped prose rows no longer get bullets.
  • F10: only requests clearly about the project files are sent back once to use a tool. "Do not use tools" is honoured (the tool call is not run). "Do the real work first." is gone from all three loops.
  • F11: the dashboard turn count survives /clear; "1 file touched".
  • F12: Esc pops only panels flagged dismissable, and that Esc does not arm the double-Esc rewind. Esc Esc arriving in one read still clears the input.
  • F13: --continue and -c alias --resume. Unknown flags exit 2 with a usage hint. --tui never falls through to a one-shot run.
  • F14: the session is saved on exit, after setting/theme changes and after an Esc rewind. A plain --resume now says "previous session restored (date)".
  • F15: -p prints the real answer (never the literal "done"), exits 1 when no answer was produced, and does not nudge plain questions into tool calls.
  • F16: darknode --help wraps to the terminal width with a hanging indent. The shift+tab line lists the default ask mode. Pull hints recommend qwen2.5-coder, as first-run setup does.
  • F17: on the local engine:
    • mode 0 asks before file changes and commands
    • accept-edits mode asks before commands and sub-agents
    • choices are Allow once / Allow for this session / Deny; allow rules skip the prompt
    • plan and bypass are unchanged
    • usage.jsonl logs mode 3 as bypass
  • F18:
    • /help settings shows its usage
    • /mcp adds "+N more"
    • /clear resets the tab title and drops a late title from the old chat
    • /model <name> on Ollama is checked against the installed models
    • bare /pager opens the last reply
    • a dismissed ask_user card reads "Dismissed without an answer"
    • /bisect gives the slash form in its message
    • /settings keeps its columns at 60 and 80 columns
    • the Ctrl+C exit prompt is a transient hint, not a transcript line
    • tips end with an ellipsis
    • footer and recap lines keep a gap before the scroll rail
    • the /keys Up/Down wording is corrected

Behaviour changes

  • Permission prompts on the local engine (F17):
    • In the default accept-edits mode, shell commands now ask first, unless an allow rule permits them or the user picked "Allow for this session".
    • Normal (ask) mode also asks before file writes and edits.
  • Auto-recap default (F7): off by default on the local engine. /recap on or /settings recap on turns it back on.
  • Unknown flags (F13): they now stop with exit 2 instead of being sent as task text. Put text after -- to send it as task text.
  • Bare /pager (F18): opens the last reply. /pager 1 opens the newest tool output.

Verified

  • npm test: 49 suites, 3819 passed, 0 failed, run with a temporary HOME.
  • New test/visual-audit.test.js (56 checks):
    • drives the pure helpers directly
    • spawns nexus -p against a scripted fake Ollama: plain question, empty answer, file request, "do not use tools"
    • spawns the CLI for the flag and help checks
    • checks the TUI wiring from source
  • Existing tests that extract functions from darknode.js now inject ensureNexusDir.
  • Live tmux runs of the worktree build (temporary HOME, Ollama qwen2.5-coder) at 100x30, 80 and 60 columns:
    • file write auto-allowed in accept-edits mode; a shell command prompts, and Deny is reported back
    • mode 0 asks before a write
    • .nexus/ is ignored by git
    • /model 1 and /model 3 pick the right models; an unknown model is rejected
    • /settings columns hold at 80 and 60 columns
    • /help settings, /mcp "+N more" and bare /pager behave as listed above
    • the Ctrl+C hint shows and clears
    • Esc does not pop the restore note; Esc Esc clears a draft
    • after /settings lean on, /theme ocean and /exit, a --resume restores those notes under "previous session restored (date)"
    • the line-mode think lines wrap
    • an interrupted turn puts the prompt back in the composer

Skipped / partial

  • The F9 rendering fix is verified with the renderer tests. The local model would not produce markdown lists live.
  • The F4 loop guard was not triggered live; its notice and rendering are covered by tests.
  • At widths below about 75 columns, darknode --help still has to split the single 42-character engine list token, because there is no space to break at.

- F1/F10/F15: local loop only sends a request back for a tool call when it is
  clearly about the files here (one nudge), honours "do not use tools", skips a
  thought that repeats the answer, never prints "done" as an answer; -p exits 1
  when the model gives no answer
- F2: every place that creates .nexus/ goes through ensureNexusDir, which drops
  .nexus/.gitignore ("*") without touching the project's .gitignore
- F3/F5/F11: files count as written (footer, undo checkpoint, recap, dashboard,
  usage) only after a successful write; a non-zero exit is a failed command; a
  denied command is not counted as run; dashboard turns survive /clear; "1 file"
- F4: loop-guard notice shows once as a dim note inside the turn
- F6: an interrupted local turn ends flagged interrupted, without "done"
- F7: no recap for interrupted or empty turns; auto-recap off by default on the
  local engine unless the recap setting is chosen
- F8: /model <number> runs as typed; arg completion prefers prefix matches
- F9: ordered lists keep their numbers, bold is painted across wrapped rows,
  list items get a hanging indent
- F12: Esc pops only dismissable panels and does not arm the double-Esc
  rewind; Esc Esc in one read still clears the input
- F13: --continue / -c alias --resume; unknown flags exit 2; --tui never runs
  a one-shot task
- F14: session saved on exit, after setting/theme changes and after a rewind;
  a plain --resume says "previous session restored"
- F16: darknode --help wraps to the terminal; shift+tab text lists ask mode;
  hints recommend qwen2.5-coder like first-run setup
- F17: local engine asks before commands in accept-edits mode and before file
  changes too in normal mode (Allow once / for this session / Deny); usage log
  names bypass mode
- F18: /help settings usage, /mcp "+N more", /clear resets the tab title,
  /model checks Ollama tags, bare /pager opens the last reply, dismissed
  ask_user card reads as text, /bisect slash wording, /settings columns at
  narrow widths, Ctrl+C exit hint is transient, tips end with an ellipsis,
  footer/recap keep a gap before the scroll rail, /keys Up/Down wording
@Darknode-Official
Darknode-Official merged commit 03a10ba into main Nov 23, 2026
6 checks passed
@Darknode-Official
Darknode-Official deleted the fix/visual-audit branch November 23, 2026 04:49
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