Skip to content

P3-09: context-aware Herdr popup plugin - #128

Merged
dvzrd merged 9 commits into
mainfrom
feat/p3-09-herdr-popup
Oct 4, 2026
Merged

dvzrd merged 9 commits into
mainfrom
feat/p3-09-herdr-popup

Conversation

@dvzrd

@dvzrd dvzrd commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add --herdr-context and optional root; explicit roots win, invalid plugin context silently falls back to the current directory.
  • Add a pure core JSON parser with explicit serde_json dependency using the existing locked version.
  • Ship a Linux/macOS 80% popup manifest and bindable action invoking HERDR_BIN_PATH, plus operator setup docs.
  • Start the unreleased dogfood section after merging P3-09/P3-10: herdr spike and Phase 3 execution decisions #127. Keep P3-09 active pending the shipping-plugin manual pass.

Verification

  • scripts/check.sh passes (fmt, clippy, tests, links, rumdl, ADR-0006 dependency guard).
  • Added parser/root precedence and fallback tests, manifest contract checks, and action argv/quoting/failure checks without touching the live Herdr session.
  • Manual linking/popup checks await operator permission. Installed dogfood binary remains v0.1.3; no release cut.

P3-10 follows in a separate PR.

@dvzrd

dvzrd commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Manual retest: correct collection, Help/Esc/Ctrl+Enter/q and clean dismissal pass, but images and Mermaid graphics fail (no graphics protocol). Explicit image config and 2s timeout do not help. Raw popup response confirms Kitty OK, but has no cell-size reply; separate 14t/18t/16t queries are also unanswered. ratatui-image 11.1.0 drops the confirmed protocol when cell metrics/PTY pixel fallback are unavailable, returning default Halfblocks/10x20. Evidence recorded in the spike doc; acceptance remains blocked and this PR stays draft. Temporary test plugin unlinked; plugin list is empty again. Installed v0.1.3 and user config/keybindings unchanged. scripts/check.sh rerun successfully after docs updates.

@dvzrd

dvzrd commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Further investigation: a probe delayed 300ms still returns Halfblocks/default 10x20. Tagged Herdr 0.9.0 source starts popups with zero pixel geometry, omits PluginPaneOpen from public/client geometry-change classifiers, and normal client-shell drawing passes resize_panes=false. The classifier omission remains in inspected v0.9.3/master, so upgrading alone is not an evidenced fix. Spike doc now records source links, a proposed host-side initial-geometry + invalidation fix, and regression requirements (immediate child query, actual metrics, no sleep/resize, CLI/action/keybinding paths). No patched Herdr build or forced protocol attempted. Second diagnostic plugin unlinked; installed binary/config unchanged. Full gate passed again.

@dvzrd

dvzrd commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Local host patch prepared (uncommitted/unpublished) against upstream master 5da0a01e, exported to /tmp/wiki-reader-herdr-popup-geometry.patch with validation notes. It initializes popup PTY and virtual-terminal metrics before child startup, invalidates geometry on plugin opens, and uses request-owner/tab-controller cell metrics. Five added regressions pass; disabling the core fix makes four fail. Native suite: 3713 pass / 12 skipped. Native fmt/clippy, architecture, Python maintenance and Bun integration/docs checks pass. Full upstream just check remains unverified (just missing; Windows cross-validation not run). No upstream implementation PR permitted for the authenticated external account; no host install/restart or patched client connected to the stable server. P3-09 remains draft pending real graphics acceptance. wiki-reader scripts/check.sh passes after recording these findings.

dvzrd and others added 2 commits October 3, 2026 18:15
…ason

- Plugin manifest: `reader` is a zoomed overlay (a normal herdr pane, so
  terminal graphics and a pane id are available); `reader-popup` keeps the
  popup, which herdr 0.9.x starts without cell metrics. Actions `open` and
  `open-popup` map to them.
- When images are off inside a herdr popup (HERDR_ENV=1, no HERDR_PANE_ID)
  the placeholder and diagram tier header say herdr popups report no cell
  size and suggest an overlay pane. Cell size is never guessed.
- An explicit `diagrams = "image"` that falls back to text now shows the
  reason in the tier header; the previous arm could never run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…xt-only

Retests show every herdr 0.9.x plugin pane, overlay included, starts without
cell metrics, so the reader cannot draw images there (an ordinary pane
detects Kitty at 8x17 and draws). Rather than depend on a herdr fix:

- `wiki-reader --herdr-split` (the plugin's default `open` action) splits the
  focused pane in its cwd via `herdr pane split`, then submits
  `exec wiki-reader` with `herdr pane run`. Std-only launcher with an
  injectable herdr runner; failures name the pane left open.
- Manifest: panes `reader-overlay` and `reader-popup` stay as text-only
  actions `open-overlay` and `open-popup`.
- Fallback text now covers any plugin pane (HERDR_ENV=1 plus
  HERDR_PLUGIN_ENTRYPOINT_ID): "plugin panes report no cell size, open the
  reader in a normal pane". Cell size is never guessed.
- Core: PluginContext parser (focused pane id and cwd) and the split
  response parser.
- Docs: plugin README, README note, integrations, spike retest and corrected
  decision, roadmap and dogfood log.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dvzrd and others added 2 commits October 3, 2026 19:25
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dvzrd
dvzrd marked this pull request as ready for review October 4, 2026 02:35
Resolve the dogfood-log rows added on both sides (P2-60 and P3-09).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dvzrd
dvzrd merged commit 75a8883 into main Oct 4, 2026
4 checks passed
@dvzrd
dvzrd deleted the feat/p3-09-herdr-popup branch October 4, 2026 02:48
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