Skip to content

fix: assortment of fixes and features#165

Merged
sadsfae merged 16 commits into
mainfrom
development
Jul 17, 2026
Merged

fix: assortment of fixes and features#165
sadsfae merged 16 commits into
mainfrom
development

Conversation

@sadsfae

@sadsfae sadsfae commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

fixes: #162
fixes: #155
fixes: #154
fixes: #153
fixes: #152

sadsfae and others added 16 commits July 17, 2026 07:05
* Fix issues in readline rendering.

Navigating command history with arrow keys left remnant "ghost characters" on the prompt line.

**Root cause:** The shell's `_rl()` helper manually wrapped ANSI escape codes in readline non-printing markers (`\x01`/`\x02`), but cmd2 already does this automatically via `rl_escape_prompt()`. The double-wrapping produced orphan `\x02` bytes that GNU readline counted as visible characters, inflating its prompt width calculation and causing incomplete redraws during history recall.

**Fix:** Removed `_rl()` and all manual `\x01`/`\x02` wrapping from prompt construction. ANSI escape codes are now passed as raw sequences, letting cmd2 handle readline escaping.

Reported history bugs are just due to terminal size.

Assisted-by: claude

fixes: #154
fix: ghost chars in cmd2, column display.
* Fix inconsistencies in help or ? menus
* Ensure help commands filtered by user role (admin vs. non-admin)

Fixes: #152
fix: align consistent help menus.
chore: add more test coverage for previous fixes
  Tab Completion section (lines 497-523): Completely rewritten to reflect the new position-aware completion behavior:
  - SSM position 1 now shows host-list + hostnames + counts
  - Admin mode shows the full positional flow: clouds, then hosts + host-list, then dates (empty), then keywords
  - Added examples for os <Tab> and vlan <Tab> value completions from server

Assisted-by: claude

Related-to: #152
fix: align other <tab> complete command-sets.
fix: sort assignment id numerically.
Add client-side OS validation via resolve_os() before submitting to API.
Matches by Title (case-insensitive) or numeric Id, shows available
options on mismatch. Sort terminate tab-completion IDs numerically (#162).

Also small refactor for DRY compliance

fixes: #153
fix: validate OS selection in schedule/mod-cloud
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/quads_client
  shell.py 356, 473, 536
  utils.py
  src/quads_client/commands
  cloud.py 193, 343-344
  host.py 50, 66, 82, 98
  schedule.py
  server.py 451
  session.py
  user.py
Project Total  

This report was generated by python-coverage-comment-action

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.15966% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/quads_client/shell.py 98.97% 2 Missing ⚠️
Flag Coverage Δ
unittests 89.03% <99.15%> (+8.91%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/quads_client/commands/cloud.py 61.65% <100.00%> (+0.48%) ⬆️
src/quads_client/commands/host.py 78.50% <100.00%> (+5.60%) ⬆️
src/quads_client/commands/schedule.py 84.11% <100.00%> (+0.18%) ⬆️
src/quads_client/commands/server.py 77.89% <ø> (ø)
src/quads_client/commands/session.py 96.17% <100.00%> (ø)
src/quads_client/commands/user.py 93.53% <100.00%> (+0.04%) ⬆️
src/quads_client/utils.py 99.13% <100.00%> (+0.17%) ⬆️
src/quads_client/shell.py 99.26% <98.97%> (+55.87%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sadsfae
sadsfae merged commit 737c229 into main Jul 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment