Skip to content

fix(tui): align events vocabulary + filter-keys hint with A1#109

Merged
chenchaoyi merged 1 commit into
mainfrom
fix/events-vocabulary
May 21, 2026
Merged

fix(tui): align events vocabulary + filter-keys hint with A1#109
chenchaoyi merged 1 commit into
mainfrom
fix/events-vocabulary

Conversation

@chenchaoyi
Copy link
Copy Markdown
Owner

Summary

Two A1-era cleanups bundled from the 2026-05-21 EN ↔ ZH TUI audit:

1. EN UI says "joined" but the events are *_seen. ble_device_seen / bonjour_service_seen / lan_host_seen were rendering in EN as [BLE] device joined: / [BJ] service joined: / [LAN] host joined:. ZH already said 设备出现 / 服务出现 / 主机出现 (appeared / seen), and the JSONL type field always said *_seen. "Joined" also misrepresents semantics — these events fire on the first passive observation, including strangers' phones walking past. Renamed three EN i18n keys to device seen: / service seen: / host seen: . ZH catalog values are unchanged.

2. Events filter footer claimed 1/2/3/4/0; A1 added 5/6/7. The filter cycle has eight buckets since A1 (ble / bonjour / lan on keys 5 / 6 / 7), action_set_filter accepts them, the bindings work. But four user-facing strings — events-modal footer + help-modal "Events modal (m)" paragraph, EN + ZH — still listed only the legacy five keys. Extended to 1/2/3/4/5/6/7/0 in both locales so the new filters are discoverable from the TUI alone.

What's in this PR

  • openspec/changes/align-events-vocabulary/ — proposal / design / tasks / tui-shell spec delta (MODIFIED requirement on EventsPanel format, three bullets + one scenario flip from joinedseen, plus a note explaining why the verb matters)
  • src/diting/i18n.py — three EN catalog keys renamed; help-modal events paragraph and events-modal footer extended (EN + ZH)
  • src/diting/tui.py:612, 884, 1947, 1970, 1993 — call-site updates
  • tests/test_tui_helpers.py:2659, 2692, 2725 — three joinedseen assertion flips
  • CHANGELOG.md + docs/zh/CHANGELOG.md — two ## [Unreleased]### Fixed entries in parity

Test plan

  • uv run pytest — 768 passed
  • uv run python scripts/tui_snapshot.py --mode regression — green
  • openspec validate --specs --strict — 21/21 passed
  • openspec validate align-events-vocabulary --strict — valid
  • EN ↔ ZH parity preserved in CHANGELOG

Audit findings file

/private/tmp/wfs-tui-audit-20260521-172708/findings.md — covers the two issues this PR fixes plus three smaller ones (BLE services column clips Information mid-word; AP hostAP heading drift in ZH basics; country-code state artifact).

Generated with Claude Code

Two A1-era cleanups bundled from the 2026-05-21 EN<->ZH TUI audit:

1. EN event panel said "joined" but the events are `*_seen`.
   `ble_device_seen` / `bonjour_service_seen` / `lan_host_seen`
   rendered in EN as `[BLE] device joined:` / `[BJ] service joined:`
   / `[LAN] host joined:`. ZH already said `设备出现 / 服务出现 /
   主机出现` and the JSONL `type` always said `*_seen`. "Joined"
   also lies about semantics — events fire on the first passive
   observation, including strangers' phones walking past. Renamed
   three EN i18n keys to `device seen: ` / `service seen: ` /
   `host seen: `; ZH unchanged.

2. Events filter docs claimed `1/2/3/4/0` but A1 added `5/6/7`.
   Bindings 5/6/7 → ble/bonjour/lan are wired in
   `EventsScreen.BINDINGS`, but four user-facing strings (modal
   footer + help-modal prose, EN + ZH) still listed only the
   legacy five keys. Extended to `1/2/3/4/5/6/7/0` in both
   locales so the new filters are discoverable from the TUI alone.

Spec: tui-shell EventsPanel-format requirement MODIFIED — three
bullets + one scenario example flip from `joined` to `seen` and
note why the verb matters.

Tests: 3 string-assertion flips in test_tui_helpers.py
(device/service/host joined -> seen). 768 pytest passed, snapshot
regression green, both openspec validates clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chenchaoyi chenchaoyi merged commit b52deda into main May 21, 2026
5 checks passed
chenchaoyi added a commit that referenced this pull request May 21, 2026
Applies the MODIFIED requirement from align-events-vocabulary
(#109) into canonical openspec/specs/tui-shell/spec.md — the
EventsPanel format bullets and BLE-seen scenario example flip
from `joined` to `seen`, with a new paragraph explaining why
the verb matters. Moves the change dir to
openspec/changes/archive/2026-05-21-align-events-vocabulary/.

All artifacts done, all tasks complete, validate --specs --strict
green (21/21).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chenchaoyi chenchaoyi mentioned this pull request May 22, 2026
6 tasks
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.

1 participant