Skip to content

fix(qauld-ctl): line editing, quoted args, account crash & help in shell - #901

Open
dastansam wants to merge 1 commit into
mainfrom
fix/qauld-ctl-shell
Open

fix(qauld-ctl): line editing, quoted args, account crash & help in shell#901
dastansam wants to merge 1 commit into
mainfrom
fix/qauld-ctl-shell

Conversation

@dastansam

@dastansam dastansam commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes a batch of qauld-ctl shell issues:

  • Line editing via rustyline: arrow up/down recall command history (also persisted to ~/.qauld-ctl_history), arrow left/right move the cursor to edit the current line. Replaces the canonical-mode line reader; async events now print through rustyline's ExternalPrinter so they don't corrupt the line being edited.
  • Quoted arguments with spaces work now, e.g. feed send -m "hello my friend": the line is tokenised with shell-style quoting (shlex) instead of split_whitespace.
  • account login/logout/status no longer crash. They hit a todo!() in encode_request that panicked the whole process (taking the shell down with it); they now delegate to the auth flow — login runs the challenge-response, logout/status return a graceful error — matching the auth command.
  • help prints the real command list (rendered clap help) instead of a vague pointer, and the same help screen is shown on shell startup.

Verified end-to-end through a pty: history recall, cursor-edit, a quoted message round-tripped through a live daemon, and the account subcommands (graceful, no panic). Adds a regression test for the account crash.

closes #898

@dastansam
dastansam force-pushed the fix/qauld-ctl-shell branch from baa033f to a466e66 Compare July 5, 2026 12:46
Fixes a batch of `qauld-ctl shell` issues:

- Line editing via rustyline: arrow up/down recall command history (also
  persisted to ~/.qauld-ctl_history), arrow left/right move the cursor to
  edit the current line. Replaces the canonical-mode line reader; async
  events now print through rustyline's ExternalPrinter so they don't
  corrupt the line being edited.
- Quoted arguments with spaces work now, e.g. `feed send -m "hello my
  friend"`: the line is tokenised with shell-style quoting (shlex) instead
  of split_whitespace.
- `account login/logout/status` no longer crash. They hit a `todo!()` in
  encode_request that panicked the whole process (taking the shell down
  with it); they now delegate to the auth flow — login runs the
  challenge-response, logout/status return a graceful error — matching the
  `auth` command.
- `help` prints the real command list (rendered clap help) instead of a
  vague pointer, and the same help screen is shown on shell startup.

Verified end-to-end through a pty: history recall, cursor-edit, a quoted
message round-tripped through a live daemon, and the account subcommands
(graceful, no panic). Adds a regression test for the account crash.
@dastansam
dastansam force-pushed the fix/qauld-ctl-shell branch from a466e66 to 0a14e6e Compare July 6, 2026 13:59
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@dastansam
dastansam marked this pull request as ready for review July 28, 2026 12:04
@dastansam dastansam self-assigned this Jul 31, 2026
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.

qauld-ctl improvements

1 participant