12 Commits

Author SHA1 Message Date
teknium1 e43f2f6816 fix(cli): retire the 0.0 monotonic sentinel in the remaining input-mode throttles
Review follow-up on #91651: _recover_terminal_input_modes and the termios
drift check used the same `now - 0.0 < interval` idiom as the repaint
throttles. Their windows (0.5s / 1.0s) are unreachable in practice, but
converting them to the None sentinel retires the bug class instead of the
instance, so nobody "simplifies" a None back to 0.0 later. Also adds the
missing regression test for _invalidate, the throttle the PR title is about.
2026-09-15 04:08:53 -07:00
Teknium eab377a407 fix(cli): first repaint no longer swallowed when monotonic clock is small
time.monotonic() counts from an arbitrary epoch (boot on Linux). Two CLI
repaint throttles used 0.0 as the never-fired sentinel, so on a freshly
booted VM (CI runners, containers) now - 0.0 < min_interval suppressed
the FIRST repaint ever requested:

- _schedule_focus_regain_redraw: min_interval=60 suppressed the first
  focus-regain redraw whenever uptime < 60s — the exact failure in CI
  run 32494557030 (test_focus_regain_redraw_is_rate_limited, both
  attempts red on a fresh runner, green everywhere else).
- _invalidate: same 0.0 sentinel; a first spinner/stream repaint inside
  the first 250ms of uptime was droppable the same way.

Both now use None as the never-fired sentinel. Regression test pins
monotonic()=3.0 with min_interval=60 and asserts the first redraw fires.
2026-09-15 04:08:53 -07:00
Teknium 22488b8c62 fix(cli): keep monitor repaints safe during prompt handoff 2026-09-08 13:39:17 -07:00
Teknium d99a63b645 fix: yield subagent monitor to incoming CLI prompts 2026-09-08 03:06:30 -07:00
Teknium 8842d4804d fix(cli): keep monitor controls pinned and resize chrome isolated 2026-09-08 03:06:30 -07:00
Teknium c6f75a32ec refactor(hermes_cli): unify resume state restore, fold trivial locals and module docstrings in g6 files 2026-09-02 22:42:56 -07:00
Teknium 48ef059a6c refactor(hermes_cli): dedupe decision-message printing, width-probe loop, plugin dedupe via dict 2026-09-02 22:35:44 -07:00
Teknium da6991f8f5 refactor(hermes_cli): extract recap-entry collection, compact docstrings, squeeze intra-function blanks across g6 files 2026-09-02 22:27:53 -07:00
Teknium 84f1bc5819 refactor(hermes_cli): tuple routing compare, debounce-timer helper, pack signatures across g6 files 2026-09-02 21:56:08 -07:00
Teknium baa22490c5 refactor(hermes_cli): fold hanging import/call spans in cli_loops_mixin and cli_terminal_mixin 2026-09-02 20:44:42 -07:00
Teknium 0ed22f614c refactor(hermes_cli): collapse EIO/loop-dispatch/terminal-write duplication in cli_terminal_mixin, compact docs 2026-09-02 20:14:57 -07:00
Teknium eb74a00c71 refactor(cli): split HermesCLI into 10 cohesive mixins (cli.py 22,284 -> 9,150)
326 methods lifted by AST (bodies identical; ast.dump-verified) into
hermes_cli/cli_{tui,status_bar,voice,model_switch,session,stream,modal,
terminal,info,loops}_mixin.py. cli.py-internal symbols resolve via lazy
'from cli import ...' inside each method (no import cycle; patch('cli.X')
keeps working). The three 'global' writers (_skill_commands, _cli_wake_owner)
now write the cli module attribute explicitly so the origin's readers still
see them. Dropped imports left unused in cli.py; kept display_hermes_home /
build_welcome_banner as re-exports (mixins + tests resolve them via cli).
Repointed two AST change-detector tests to cli_tui_mixin.py; one test
fixture now keeps 'cli' in sys.modules across its patch.dict scope.
2026-09-02 15:42:24 -07:00