Skip to content

Utility-extraction prep: progress-symbol decoupling, api_utils cleanup, plan specs#7

Merged
jlevy merged 5 commits into
mainfrom
claude/trusting-johnson-3Rh6w
Jun 11, 2026
Merged

Utility-extraction prep: progress-symbol decoupling, api_utils cleanup, plan specs#7
jlevy merged 5 commits into
mainfrom
claude/trusting-johnson-3Rh6w

Conversation

@jlevy

@jlevy jlevy commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Safe prep work for extracting kash's reusable utilities into standalone packages, plus the plan specs that map out the extractions.

Code cleanups (behavior-neutral, all tests pass)

  • Decouple progress symbols (859424e): removes the 6 hardcoded EMOJI_* constants from progress_protocol.py; adds an injectable ProgressSymbols dataclass with neutral defaults. kash now sources its emojis from text_styles.py (its authoritative set, gaining EMOJI_RETRY/EMOJI_WAITING). Visual output unchanged.
  • api_utils cleanup (a6e6d5d): deletes multitask_gather.py and cache_requests_limited.py (zero production callers; both pulled kash settings/shell/web_content imports into the otherwise self-contained bundle) and moves the 8 inline tests out of api_retries.py into tests/kash/utils/api_utils/test_api_retries.py. This leaves the gather_limited + api_retries + progress_protocol + http_utils bundle clean for extraction as a standalone gather-limited package.

Plan specs

  • plan-2026-05-23-utility-extraction.md: menu of 10 independent extraction phases (gather-limited, file utilities, terminal/Rich, clideps trim, flowmark/prettyfmt additions, etc.) with per-phase testing plans (pytest + tryscript golden tests).
  • plan-2026-05-23-rich-cli-tools.md: end-to-end implementable spec for a new standalone terminal-UX package consolidating kash's rich_custom/unified_live/nerd_icons and clideps's terminal/ui modules, scaffolded from simple-modern-uv, with a companion agent skill. Nine tbd beads track the phases.

Tooling

  • tbd upgraded 0.1.28 → 0.2.3 with setup refresh (19f1fb5).

Test plan

  • All 39 tests in affected modules pass (tests/kash/utils/api_utils/, src/kash/utils/api_utils/, src/kash/utils/rich_custom/, tests/kash/utils/rich_custom/)
  • Lint passes (devtools/lint.py)
  • Import check on all remaining api_utils modules
  • Grep-verified zero production callers for both deleted files and no stale EMOJI_* imports

https://claude.ai/code/session_01ASsBTDGgzLRb3C5Aj5wkJW


Generated by Claude Code

Removes the duplicate EMOJI_* constants from progress_protocol.py and
introduces a ProgressSymbols dataclass that SimpleProgressTracker and
SimpleProgressContext accept via the new `symbols=` parameter, letting
callers override the icons for task state transitions.

Moves kash's authoritative EMOJI_RETRY and EMOJI_WAITING into
text_styles.py alongside the rest of the kash emoji set, and switches
multitask_status.py to source emojis from text_styles. Visual output is
unchanged.

This isolates progress_protocol.py from kash branding in preparation for
extracting the gather-limited bundle as a standalone library.

https://claude.ai/code/session_01ASsBTDGgzLRb3C5Aj5wkJW
Menu-style spec for extracting kash's reusable utilities into new or
existing packages. Covers: gather-limited as standalone package, a new
file/system utilities package, a new terminal/Rich utilities package
(absorbing parts of clideps to refocus clideps on package management),
and targeted additions to flowmark/prettyfmt. Includes per-phase testing
plans using pytest + tryscript golden tests.

https://claude.ai/code/session_01ASsBTDGgzLRb3C5Aj5wkJW
Upgrades tbd from v0.1.28 to v0.2.3 and runs `tbd setup --auto`:
refreshed hooks, skill files, AGENTS.md integration, and Codex hooks;
cleaned up legacy hooks and stale config entries.

https://claude.ai/code/session_01ASsBTDGgzLRb3C5Aj5wkJW
Plan spec for a new standalone terminal-UX package consolidating kash's
rich_custom/unified_live/nerd_icons modules and clideps's terminal/ui
modules. Dependency-minimal (rich + strif + typing-extensions), no
clideps dependency (clideps becomes a consumer later). Includes
simple-modern-uv scaffolding steps, module-by-module decoupling notes,
tryscript golden testing, a companion agent skill, and consumer
migration plans. Nine beads track the phases.

https://claude.ai/code/session_01ASsBTDGgzLRb3C5Aj5wkJW
@jlevy jlevy marked this pull request as ready for review June 11, 2026 19:43
- Delete multitask_gather.py and cache_requests_limited.py: zero
  production callers; both pulled kash settings/shell/web_content
  imports into the otherwise self-contained bundle.
- Move the 8 inline test functions from api_retries.py into
  tests/kash/utils/api_utils/test_api_retries.py (~265 LOC out of the
  production module).
- Mark these prep items done in the utility-extraction plan spec.

https://claude.ai/code/session_01ASsBTDGgzLRb3C5Aj5wkJW
@jlevy jlevy changed the title refactor: inject progress symbols instead of hardcoding emojis Utility-extraction prep: progress-symbol decoupling, api_utils cleanup, plan specs Jun 11, 2026
@jlevy jlevy merged commit 0786d72 into main Jun 11, 2026
4 checks passed
@jlevy jlevy deleted the claude/trusting-johnson-3Rh6w branch June 11, 2026 23:11
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.

2 participants