Skip to content

Make Argo ec ps a single argocd app list call - #260

Merged
gilesknap merged 7 commits into
mainfrom
feat/256-fast-ps
Sep 22, 2026
Merged

gilesknap merged 7 commits into
mainfrom
feat/256-fast-ps

Conversation

@gilesknap

@gilesknap gilesknap commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Closes #256, following the decisions in issuecomment-5775011831 and issuecomment-5775064203. This covers the Argo CD backend only.

What changes

ec ps on the Argo CD backend used to make one argocd app list plus one argocd app manifests --source live for each service. The manifest fetch was only there to read the live workload's creationTimestamp for the deployed column. Now every column comes from the single argocd app list, as argocd-monitor does. ec ps and each refresh of ec monitor cost one call, however many services there are.

The columns follow argocd-monitor:

Column Source
name metadata.name
health status.health.status, replacing ready. (Stopped) is appended when the STOPPED label is set, where argocd-monitor shows a Stopped badge
sync status.sync.status (new)
version spec.source.targetRevision
last sync status.operationState.finishedAt, replacing deployed. Empty when there has been no operation
description The epics-containers.github.io/description annotation from #255. Empty when unset
properties Only with the new -w/--wide. The Application's labels minus argocd-monitor's HIDDEN_LABELS (argocd.argoproj.io/instance, STOPPED), with the argocd.argoproj.io/ prefix stripped
  • --running-only now means health is exactly Healthy, so stopped services are still excluded, as they were with ready.
  • ec monitor shows the same columns as ec ps: description is a real, sortable column (previously it was shoved into the Textual DataTable's row-label slot and never appeared as a column at all — a pre-existing bug, not something this PR introduced but now fixed alongside it), and the new -w/--wide adds properties, matching ec ps --wide. The health and sync cells are coloured, and the logs key is gated on Healthy. This PR also fixes the sort key, which cycled through only the first four columns.
  • K8S backend (no feature work). It still makes 2 calls. It maps onto the shared schema like this: health is Healthy when a replica is ready and Degraded otherwise, sync is empty, last sync is the StatefulSet's creationTimestamp (the old deployed), and properties is empty.
  • The Demo backend fills the new columns.
  • Docs: docs/reference/cli.md documents the columns and --wide for both ec ps and ec monitor.

ec monitor follow-up: columns, colour and sort direction

Follow-up commits on this branch fix several ec monitor-only issues found
while dogfooding the ec ps column rework above:

  • Columns now match ec ps. IocTable never used the ec ps
    column-selection logic — it always included properties (there was no
    --wide for monitor at all) and stripped description out of the column
    list into the DataTable's row-label slot instead of showing it as a
    column. ec monitor now shows name, health, sync, version, last sync, description by default, and -w/--wide (mirroring ec ps -w) adds
    properties.
  • Healthy (Stopped) is now red, not grey, matching argocd-monitor's
    separate red "Stopped" badge next to the health badge.
  • Headers and cells are left-justified instead of centred, matching
    ec ps's Rich table.
  • Sorting has a direction, ascending or descending. The sorted column's
    header shows ▲ (ascending) or ▼ (descending):
    • o cycles the sort key through the visible columns (in display order,
      wrapping around, including description, and properties only with
      --wide) and always resets to ascending.
    • The new d key toggles the current sort column's direction without
      changing which column is sorted.
    • Clicking a header sorts by it: clicking a different column makes it the
      sort column, ascending; clicking the header that's already the sort
      column toggles its direction (same as d).
    • Row order keeps the chosen direction across the monitor's background
      polling refreshes, instead of resetting to ascending on every refresh.
    • I looked into a suspected bug where o skipped description and
      dropped the arrow entirely for a couple of presses. It didn't reproduce
      against this branch's own column fix above — self.columns (used both
      to build headers and to drive the cycle) was already the single,
      correctly --wide-filtered list — but the cycling code has been
      rewritten as part of adding direction, so I kept it in mind while doing
      so and covered it directly with test_monitor_sort_cycle_default_columns
      / test_monitor_sort_cycle_wide_columns.

tests/test_monitor.py covers each of these: the default and --wide
column sets, left-justification of headers and cells, the stopped-red
colour, a full o cycle in both column sets (exactly one arrow, always
ascending, wrapping back to name), the d toggle (arrow flips and row
order reverses), a header click on another column, a header click on the
current column (toggles), and direction surviving a polling refresh.

Two more ec monitor-only fixes found while poking at the above:

  • Columns didn't widen on a polling refresh. IocTable.populate_table
    called DataTable.update_cell without update_width=True (it defaults to
    False), so a cell that grows on refresh — the running example being
    health going from "Healthy" to "Healthy (Stopped)" when a service is
    stopped while the monitor is open — got its new text clipped to the old
    column width instead of the column resizing, as it would for a freshly
    added row. Fixed by passing update_width=True.
    test_monitor_column_widens_on_refresh drives a row from "Healthy" to
    "Healthy (Stopped)" through populate_table (the same path
    do_polling uses) and asserts the column's width grew to fit.
  • A tight header clipped its own sort arrow. A column's width is set
    once, from the header Text passed to add_column(); moving the sort key
    later just swaps a column's label in place (_apply_sort) without
    recomputing its width. So a column whose data is no wider than its label —
    version's demo data ("1.0.25", 6 chars) is narrower than version
    itself (7 chars) — got its ▲/▼ cut off the moment it became the sort
    column, because the column was never sized for it. Fixed by having every
    header reserve " <arrow>"'s width up front (_SORT_SUFFIX_WIDTH),
    whether or not it's currently sorted, rather than only recomputing on
    demand — simpler, and it also stops columns jumping width as the sort
    moves. test_monitor_sort_arrow_does_not_clip_header sorts by version
    in both directions and asserts the column is at least
    len("version ▲")/len("version ▼") wide.

ec monitor: removed the "!" status column, refresh after actions instead

The rightmost column was a busy/action indicator that predates this branch
entirely (present already on main): update_indicator_threadsafe filled
a service's cell with a road-works or hourglass icon while
start/stop/restart was queued or running, and cleared it back to
empty once the action finished. Its header was the raw Unicode glyph used
as its internal id, Emoji.exclaim (U+2755) — some terminal fonts don't
have a glyph for it and fall back to a bare !, reading as a stray,
broken column with no data. An earlier commit on this branch just relabelled
it "status" and excluded it from sorting; on reflection, health and
sync already make it redundant, so it's removed outright instead —
INDICATOR_COLUMN/INDICATOR_HEADING, update_indicator_threadsafe and
its lock/state, the sort-cycle/header-click exclusion that only existed to
skip it, and the Emoji enum it was the sole consumer of.

In its place, start/stop/restart now trigger a table refresh once the
command returns, instead of only ever finding out on the next poll tick
(up to 1s later, and Argo itself can lag a bit longer than that): a first
refresh ACTION_REFRESH_DELAY (1s — started at 0.5s, moved out after live
use showed that was too soon) after the command returns, plus a follow-up
ACTION_REFRESH_FOLLOW_UP_DELAY (3s) later in case Argo hasn't caught up
yet. Both go through the same refresh path the poll loop already used —
IocTable.do_polling's body is now _refresh_once, shared via the new
refresh_now() — guarded by a lock so an on-demand refresh can't overlap
the poll loop or another on-demand refresh; a refresh already in flight is
skipped, not queued.

test_monitor_sort_cycle_default_columns/_wide_columns now assert the
o cycle visits exactly the visible data columns (no more indicator
exclusion to test). test_monitor_action_schedules_refresh drives a real
start action through the confirm dialog and asserts the two refreshes are
scheduled at ACTION_REFRESH_DELAY/ACTION_REFRESH_FOLLOW_UP_DELAY
against refresh_now, independent of the (untouched, still-running) 1s
poll timer.

ec monitor: stop leaking ]22;text onto the header icon

Textual's App._set_pointer_shape (textual/app.py, private API) writes
the Kitty pointer-shape escape ESC ] 22 ; <shape> BEL unconditionally on
mouse events, with no terminal-capability check, right after parking the
cursor at (0, 0) for the frame. A terminal that doesn't consume OSC 22
prints it as literal text over the Header's icon cell instead — e.g.
clicking anywhere in the table left ]22;text stuck top-left, never
repainted because that cell's content doesn't otherwise change.

MonitorApp now overrides _set_pointer_shape to a no-op. Since it's a
private API, pyproject.toml's textual bound is now >=7.4,<9 (was
>=7.4) so a future Textual major can't silently change or drop the method
under the override; uv.lock is updated to match (still resolving 7.4.0,
no dependency bump). test_monitor_pointer_shape_override_point_exists
asserts App still has _set_pointer_shape, so a rename fails the test
suite instead of silently reintroducing the leak.
test_monitor_click_does_not_leak_osc22 spies on the test driver's
write, drives a real click through Pilot, and asserts nothing
containing \x1b]22; was ever written; run against the code without the
override, the same test does see the escape sequence.

ec monitor: scroll a newly-sorted column into view

Sorting is --wide-able and now direction-aware (see above), but a narrow
terminal can still leave the new sort column - and its ▲/▼ arrow -
off-screen: the table never auto-scrolled to it, so cycling o past the
visible width silently sorted by a column you couldn't see. Now, whenever
a column becomes the sort column (o, a header click, or d in the case

  • not currently reachable - that it ever changed the sort column rather
    than just the direction), the table scrolls horizontally, only as far as
    needed, so the whole column including its header is visible. Never moves
    the row cursor or the vertical scroll.

DataTable has no public "scroll to column" API. IocTable._apply_sort
now calls the new _scroll_sort_column_into_view, which mirrors what
DataTable's own (private) _scroll_cursor_into_view does for a
"column"-type cursor: build the sort column's region from
_get_column_region/_get_fixed_offset and hand it to the public
scroll_to_region, which only scrolls if the region isn't already fully
visible - so a d press, or an o/click landing on an already-visible
column, is a no-op. This is the same private surface _set_pointer_shape
above already relies on, protected by the same textual<9 pin.

test_monitor_sort_scrolls_offscreen_column_into_view runs the app at a
narrow 30-column terminal, confirms version starts off-screen, cycles
o to it, and asserts scroll_x moved and the column's region is now
fully inside the viewport - while the row cursor and scroll_y are
unchanged. test_monitor_sort_does_not_scroll_when_column_already_visible
runs at the normal 80-column width (every other test's default, where all
columns already fit) and asserts a full o cycle plus a d press never
moves scroll_x.

Does ec restart still show in last sync? Yes, tested live

ec restart runs argocd app delete-resource --kind StatefulSet --all. The old deployed column only caught it through the live StatefulSet's creationTimestamp. To check last sync, I deleted one StatefulSet on t11-beamline (argus) the same way (kubectl delete statefulset bl11t-ea-test-01, 2026-09-22T11:02:12Z) and watched the Application:

Before After
Application status.operationState.finishedAt 2026-09-22T09:03:19Z 2026-09-22T11:02:13Z
operation initiatedBy.automated: true, autoHealAttemptsCount: 1, resources: [apps/StatefulSet bl11t-ea-test-01]
status.history ids 0 to 1 new id 2, deployedAt 2026-09-22T11:02:13Z
StatefulSet created 2026-09-21T14:11:59Z 2026-09-22T11:02:13Z (new uid)
pod bl11t-ea-test-01-0 Running, created 2026-09-21T14:11:59Z Running, created 2026-09-22T11:02:18Z
health / sync Healthy / Synced Progressing for about 5s, then Healthy / Synced

Argo CD's self-heal recreates the StatefulSet with a sync operation, and that operation rewrites operationState.finishedAt. So a restart does show in last sync. ec restart depends on self-heal anyway: without it the StatefulSet would never come back.

Two other cases:

  • Pod deletes. Deleting only a pod moves neither finishedAt nor the old deployed, so nothing is lost there.
  • status.reconciledAt. It changes every few minutes for every app, so it can't stand in for "last activity".

Evidence

  • One call, any app count. tests/test_argocd.py::test_ps_makes_one_argocd_call[1|5|50] asserts that the argocd calls are exactly argocd app get <target> (the target check every ec command makes) and one argocd app list. The mocked shell fails the test on any further call.
  • Output. test_ps, test_ps_wide and test_ps_running_only check exact tables. The fixture covers an umbrella app (skipped), a stopped service, labels, an app with no operation yet, and OutOfSync/Progressing. Rich's console width is set explicitly (COLUMNS=200) instead of matching ellipses.
  • TUI. tests/test_monitor.py runs MonitorApp headless on the demo backend. It checks the column set (default and --wide, no more status column), cell values, left-justification, sort cycling and direction (key presses, header clicks, surviving a refresh), column auto-width on refresh and on a tight sort-arrow header, the stopped-red colour, that no OSC 22 escape reaches the driver, that a real start action schedules the two post-action refreshes at the right delays, and that sorting scrolls an off-screen column into view (narrow terminal) but never scrolls when the column's already visible (normal width).
  • Checks. pytest: 90 passed. ruff check and ruff format --check are clean. pyright: 0 errors, 0 warnings. The docs build is clean.
  • Live t11 Applications. The sandbox has no argocd CLI, so this rendering feeds kubectl get applications -o json (the same objects argocd app list returns) through ec ps:
╭────────────────────┬─────────┬────────┬─────────┬──────────────────────┬───────────────────────────────────────────────────────╮
│ name               │ health  │ sync   │ version │ last sync            │ description                                           │
├────────────────────┼─────────┼────────┼─────────┼──────────────────────┼───────────────────────────────────────────────────────┤
│ bl11t-di-cam-01    │ Healthy │ Synced │ main    │ 2026-09-21T14:12:00Z │ Simulated area detector camera                        │
│ bl11t-ea-test-01   │ Healthy │ Synced │ main    │ 2026-09-22T11:02:13Z │ Test IOC with A, B and SUM PVs                        │
│ bl11t-mo-sim-01    │ Healthy │ Synced │ main    │ 2026-09-21T14:12:02Z │ Simulation of 2 motors                                │
│ bl11t-synoptic     │ Healthy │ Synced │ main    │ 2026-09-22T09:04:13Z │ Generated synoptic and component screens              │
│ t11-blueapi        │ Healthy │ Synced │ main    │ 2026-09-21T14:43:55Z │ Bluesky REST API for running plans                    │
│ t11-epics-gateways │ Healthy │ Synced │ main    │ 2026-09-21T14:12:00Z │ CA and PVA gateways into the beamline IOCs            │
│ t11-epics-opis     │ Healthy │ Synced │ main    │ 2026-09-22T09:07:57Z │ Web server for the beamline's Phoebus OPI screens     │
│ t11-epics-pvcs     │ Healthy │ Synced │ main    │ 2026-09-21T14:12:00Z │ Shared volumes for IOC data, config and runtime files │
│ t11-keycloak       │ Healthy │ Synced │ main    │ 2026-09-21T14:43:47Z │ Local identity provider for test users                │
│ t11-numtracker     │ Healthy │ Synced │ main    │ 2026-09-21T14:15:57Z │ Scan number and data path service                     │
│ t11-opa            │ Healthy │ Synced │ main    │ 2026-09-21T14:12:00Z │ Policy engine that authorises blueapi requests        │
│ t11-rabbitmq       │ Healthy │ Synced │ main    │ 2026-09-21T14:12:02Z │ Message bus for blueapi events                        │
│ t11-tiled          │ Healthy │ Synced │ main    │ 2026-09-21T14:12:01Z │ Data server that stores and serves scan data          │
╰────────────────────┴─────────┴────────┴─────────┴──────────────────────┴───────────────────────────────────────────────────────╯

bl11t-ea-test-01 shows the restart above. The t11 umbrella app is skipped. No t11 Application has labels, so --wide shows an empty properties column there.

Upgrade note

  • The ec ps columns ready and deployed are replaced by health, sync and last sync. Scripts that parse ec ps output need updating.
  • ec monitor's columns now match ec ps: description is a real column shown by default, and the new -w/--wide (mirroring ec ps -w) adds properties. Sorting (o, or a header click) now has a direction, shown as ▲/▼; the new d key (or clicking the current sort column's header) toggles it.
  • ec monitor's "!" busy/action status column is gone; health/sync already covered it. start/stop/restart now refresh the table 1s and, again, 3s after the command returns instead.
  • ec monitor now scrolls the table horizontally, if needed, to keep a newly-sorted column fully in view.
  • textual's dependency bound tightens from >=7.4 to >=7.4,<9, to protect the private-API overrides (pointer-shape suppression, sort-column scroll-into-view) above. No version bump — still resolves to 7.4.0.

🤖 Generated with Claude Code

ec ps on the Argo CD backend made one `argocd app list` plus one
`argocd app manifests --source live` per service, only to read the live
workload's creationTimestamp for the `deployed` column. It now builds
every column from the one app list, as argocd-monitor does, so ps and
the monitor TUI cost one call however many services there are.

Columns now follow argocd-monitor: name, health (replaces ready), sync,
version, last sync (status.operationState.finishedAt, replaces deployed)
and description. A new --wide option adds properties, the Application's
labels minus argocd.argoproj.io/instance and STOPPED. A stopped service
shows as "Healthy (Stopped)" and is excluded by --running-only, as
before. `ec monitor` shows the same columns.

`ec restart` still shows up in last sync: deleting the StatefulSet
makes Argo CD's self-heal run a sync operation, which rewrites
operationState.finishedAt (checked live on t11-beamline).

The K8S backend keeps its two calls and maps onto the new columns:
health is Healthy or Degraded from readyReplicas, last sync is the
StatefulSet creationTimestamp, sync and properties are empty.

Also fix the monitor's sort-column cycling, which stopped at the
fourth column.

Closes #256

Co-Authored-By: Claude Opus 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6343876b-9a8c-483b-94a0-c4fd465f099b

📥 Commits

Reviewing files that changed from the base of the PR and between 8aeefcc and d690af7.

📒 Files selected for processing (13)
  • docs/reference/cli.md
  • src/edge_containers_cli/cli.py
  • src/edge_containers_cli/cmds/argo_commands.py
  • src/edge_containers_cli/cmds/commands.py
  • src/edge_containers_cli/cmds/demo_commands.py
  • src/edge_containers_cli/cmds/k8s_commands.py
  • src/edge_containers_cli/cmds/monitor.py
  • tests/conftest.py
  • tests/data/argocd.yaml
  • tests/test_argocd.py
  • tests/test_demo.py
  • tests/test_k8s.py
  • tests/test_monitor.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The service table schema now uses health, sync, last sync, description, version, and properties columns. ec ps and ec monitor support --wide. Argo now builds rows from one application-list response. The monitor displays status colors and sortable columns.

Changes

Service status flow

Layer / File(s) Summary
Status contract and wide option wiring
src/edge_containers_cli/cmds/commands.py, src/edge_containers_cli/cli.py, docs/reference/cli.md, tests/conftest.py
The shared schema replaces ready and deployed with status columns. The CLI passes --wide to both commands. Documentation and table-width test support describe the new output.
Backend row construction and validation
src/edge_containers_cli/cmds/argo_commands.py, src/edge_containers_cli/cmds/k8s_commands.py, src/edge_containers_cli/cmds/demo_commands.py, tests/data/argocd.yaml, tests/test_argocd.py, tests/test_k8s.py, tests/test_demo.py
Argo derives rows from one argocd app list response. Kubernetes and demo backends use the shared status columns. Tests cover wide output, filtering, timestamps, descriptions, properties, and call count.
Monitor columns and interactions
src/edge_containers_cli/cmds/monitor.py, tests/test_monitor.py
The monitor supports properties, left-aligned cells, status colors, sort arrows, sorting across all columns, and health-based log access. Tests cover these behaviors.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ArgoCommands
  participant ArgoCD
  participant Monitor
  CLI->>ArgoCommands: request ps with wide option
  ArgoCommands->>ArgoCD: fetch application list once
  ArgoCD-->>ArgoCommands: return application records
  ArgoCommands-->>CLI: return service rows
  CLI->>Monitor: pass rows and wide option
  Monitor-->>CLI: render status table
Loading

Suggested reviewers: ocopping

Merge Risk: 🟡 Moderate · up to d690a

Argo status now uses the application operation timestamp, so ec ps and ec monitor may show stale activity after ec restart if self-healing does not update that field. Verify this behavior or explicitly accept the uncertainty before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning [#256] scopes the change to the Argo backend. This PR also changes the shared ServicesSchema, K8S and Demo mappings, CLI --wide options, monitor colors and sorting, and related documentation. Thes… Split the shared schema, K8S/Demo mapping, monitor, CLI --wide, and related documentation changes into a separately scoped issue or pull request, or link coding requirements that explicitly authorize those changes. Keep the Argo O(1) impl…
Docstring Coverage ⚠️ Warning Docstring coverage is 20.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 69 functions across 11 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The Argo implementation satisfies [#256]. app_to_row reads health, sync, version, status.operationState.finishedAt, and the Application description annotation from each argocd app list object. T…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the primary change: Argo ec ps now uses a single argocd app list call. It is concise and specific.
Full details: Out of Scope Changes check

Explanation

[#256] scopes the change to the Argo backend. This PR also changes the shared ServicesSchema, K8S and Demo mappings, CLI --wide options, monitor colors and sorting, and related documentation. These changes are not required to remove Argo argocd app manifests calls. Argo-specific tests are in scope, but the broader output and backend changes exceed the linked issue scope.

Resolution

Split the shared schema, K8S/Demo mapping, monitor, CLI --wide, and related documentation changes into a separately scoped issue or pull request, or link coding requirements that explicitly authorize those changes. Keep the Argo O(1) implementation and its direct tests in this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 69 functions across 11 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

gilesknap and others added 6 commits September 22, 2026 11:41
The monitor's IocTable never used ec ps's column selection: it always
included properties (no --wide option existed) and stripped description
out into an unlabelled DataTable row label instead of a real column, a
bug the previous test enshrined as expected behaviour. Now monitor
shows name, health, sync, version, last sync, description by default,
matching ec ps, and --wide adds properties, matching ec ps --wide.

Also left/centre-justify columns and headers to left (matching ec ps's
rich Table), mark the sorted column's header with a single ascending
arrow (the table only ever sorts ascending), and colour "Healthy
(Stopped)" red instead of grey, matching argocd-monitor's separate red
"Stopped" badge.

Co-Authored-By: Claude Opus 5 <[email protected]>
Add ascending/descending sort direction: the sorted header shows ▲ or ▼,
the new 'd' key (or clicking the current sort header) toggles direction,
'o' still cycles columns but always resets to ascending, and direction
now survives the monitor's polling refreshes (previously hardcoded to
ascending on every refresh).

Fix two column-width bugs surfaced while building that: a refreshed
cell that grows (e.g. health becoming "Healthy (Stopped)") no longer
gets clipped to the old column width (DataTable.update_cell needs
update_width=True, which defaults to False); and every header now
reserves room for " <arrow>" up front, so a column whose data is no
wider than its label (e.g. version) no longer clips the arrow the
moment it becomes the sort column.

Also override MonitorApp._set_pointer_shape as a no-op: Textual writes
its Kitty pointer-shape OSC 22 escape unconditionally on mouse events,
and a terminal that doesn't consume it prints the raw escape as text
over the Header icon. Since it's a private API, tighten the textual
dependency bound to <9 and add a test that pins the method's presence.

Co-Authored-By: Claude Opus 5 <[email protected]>
The rightmost column's header showed the raw Unicode glyph
Emoji.exclaim (U+2755) used as its internal id - a symbol some
terminal fonts fall back to rendering as a bare "!", easily mistaken
for a stray/broken column. It's a deliberate busy/action indicator
(update_indicator_threadsafe fills it with a road-works or hourglass
icon while start/stop/restart is queued or running, empty otherwise),
present since before this branch, not new column-selection fallout.

Give it a plain "status" heading instead of the raw glyph, and exclude
it from the sort cycle ('o') and from header-click sorting: it isn't
per-service data, so sorting by it was never meaningful. The sort-cycle
tests now assert every column 'o' visits has a real text header and
that the indicator column keeps its fixed label throughout.

Co-Authored-By: Claude Opus 5 <[email protected]>
…tead

Health/sync already make the busy/action indicator column redundant, so
drop it entirely: the "!" indicator column (INDICATOR_COLUMN/HEADING),
update_indicator_threadsafe and its lock/state, the Emoji enum it was
the only consumer of, and the sort-cycle/header-click exclusion that
existed only to skip it.

In its place, start/stop/restart now trigger an on-demand table refresh
once the command returns (0.5s delay), plus a follow-up 3s later since
Argo can take a moment longer to reflect the change. Both go through the
same refresh path the poll loop uses (IocTable._refresh_once, now shared
via refresh_now()), guarded by a lock so an on-demand refresh can't
overlap the poll loop or another on-demand refresh.

Co-Authored-By: Claude Opus 5 <[email protected]>
…n the new refresh test

Assigning a plain function to app.set_timer failed pyright's type check
(Timer-returning signature); monkeypatch.setattr avoids the mismatch
while testing the same thing.

Co-Authored-By: Claude Opus 5 <[email protected]>
…tion refresh to 1s

Sorting by a column that's off-screen (o, a header click, or - in
principle - d if it ever changes the sort column) now scrolls the table
horizontally, only as far as needed, so the column and its arrow are
fully visible. Mirrors DataTable's own private column-cursor reveal
logic (_get_column_region/_get_fixed_offset + the public
scroll_to_region), under the same textual<9 pin that already protects
_set_pointer_shape. Never touches the row cursor or vertical scroll.

Also: ACTION_REFRESH_DELAY (the first post-action refresh) moves from
0.5s to 1s based on live feedback that 0.5s was too soon; the 3s
follow-up is unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
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.

Argo backend: make ec ps O(1) regardless of app count (drop per-app manifest fetch)

1 participant