Skip to content

refactor(workstation): extract changelog local keymap into surfaces/changelog/input.ts - #1801

Merged
gfargo-horizon-agent[bot] merged 2 commits into
mainfrom
agent/coco-1062-extract-changelog-local-keymap-into-surf
Jul 21, 2026
Merged

refactor(workstation): extract changelog local keymap into surfaces/changelog/input.ts#1801
gfargo-horizon-agent[bot] merged 2 commits into
mainfrom
agent/coco-1062-extract-changelog-local-keymap-into-surf

Conversation

@gfargo-horizon-agent

@gfargo-horizon-agent gfargo-horizon-agent Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What

Extracts the contiguous activeView === 'changelog' local keymap block from inkInput.ts's router into a new src/workstation/surfaces/changelog/input.ts, exporting handleChangelogInput(state, inputValue, key, context): LogInkInputEvent[] | null. Wired via a delegating call at the same precedence position (immediately after the handleBisectInput delegation, before the bare-g chord handler). Mirrors the existing surfaces/bisect/input.ts extraction (#1625).

Why

Plane: OSS-1062

Sub-item 2/4 of OSS-950 — continuing to slice view-scoped keymaps out of the monolithic inkInput.ts router into per-surface modules.

How

  • New src/workstation/surfaces/changelog/input.ts: the changelog keymap block (j/k/pgup/pgdn scroll, arrow-key synonyms, y/E/c/r workflow keys, and the loading-state scroll-key swallow) moved verbatim, with a return null fall-through when nothing matches so the router continues.
  • inkInput.ts: replaced the inline block with a handleChangelogInput(...) delegation at the same precedence slot.
  • Intentionally left in place: the two changelog gg/G top/bottom-jump special-cases in inkInput.ts. They live nested inside the shared moveToTop/moveToBottom chord handlers alongside the blame/file-history branches — not part of the contiguous block being extracted — and pulling them out would require restructuring those shared handlers, which is out of scope for this change.
  • Added src/workstation/surfaces/changelog/input.test.ts with direct unit coverage of the new handler (mirrors bisect/input.test.ts), in addition to the existing inkInput.test.ts changelog cases which now exercise the delegation end-to-end.

Testing

  • build passes
  • tests pass / added — npx jest src/workstation/runtime/inkInput.test.ts (431 passed, unmodified) and npx jest src/workstation/surfaces/changelog/input.test.ts (7 new, passed)
  • lint clean — npm run lint (0 errors, pre-existing warnings only, none in touched files)
  • CI: pending

🤖 Generated by the harbor agent loop. Reviewed by a human before merge.

…hangelog/input.ts

Moves the contiguous activeView === 'changelog' keymap block (j/k/pgup/pgdn
scroll, y/E/c/r workflow keys, loading-state swallow) out of inkInput.ts's
router into a new handleChangelogInput handler, mirroring the surfaces/bisect
extraction. Wired via a delegating call at the same precedence position.

The changelog view's gg/G top/bottom jumps are intentionally left in place —
they're nested inside the shared moveToTop/moveToBottom chord handlers
alongside blame/file-history branches, not part of the contiguous block, and
extracting them would require restructuring those shared handlers.

@gfargo-horizon-agent gfargo-horizon-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Agent review (sonnet) — CONCERNS

Test file looks solid and mirrors the bisect pattern. Now check bisect/input.ts for pattern consistency and run the test/lint suite to verify.

@gfargo-horizon-agent gfargo-horizon-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Agent review (sonnet) — LGTM

REVIEW: LGTM
RESOLVES: full

Clean, verbatim extraction of the changelog local keymap into surfaces/changelog/input.ts, mirroring the bisect pattern exactly, with the gg/G exclusion correctly documented in both the code and the extracted module's docstring. All acceptance criteria are met: existing inkInput.test.ts changelog cases are unmodified, new direct unit tests cover the handler, and CI is green.

@gfargo-horizon-agent gfargo-horizon-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Agent review (sonnet) — LGTM

REVIEW: LGTM
RESOLVES: full

Verbatim extraction of the changelog local keymap into surfaces/changelog/input.ts, wired at the same precedence slot as the bisect pattern; the gg/G exclusion is correctly left in place and clearly documented in both the module docstring and the inkInput.ts comment. Diff is scoped to exactly the 3 relevant files, new unit tests cover the handler in isolation, and jest (438 passed) plus eslint are clean.

@gfargo-horizon-agent gfargo-horizon-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Agent review (sonnet) — LGTM

REVIEW: LGTM
RESOLVES: full

Clean, verbatim extraction of the changelog local keymap into surfaces/changelog/input.ts, wired at the correct router precedence and mirroring the existing bisect pattern exactly; the gg/G exclusion is explicitly documented in both the module docstring and the call-site comment as required. Diff is tightly scoped to the three relevant files, all changelog behavior is covered by both new isolation tests and unmodified router-level tests, and test:jest/lint pass locally.

…ct-changelog-local-keymap-into-surf

# Conflicts:
#	src/workstation/runtime/inkInput.ts

@gfargo-horizon-agent gfargo-horizon-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Agent re-review (sonnet, delta) — LGTM

REVIEW: LGTM
RESOLVES: full

The revise cleanly extracts the changelog local keymap into surfaces/changelog/input.ts verbatim, mirrors the bisect pattern, correctly documents (in both code comments and the delegation site) why the gg/G jumps stay in inkInput.ts, and all targeted tests plus lint pass with no errors.

@gfargo-horizon-agent
gfargo-horizon-agent Bot merged commit 3def2c1 into main Jul 21, 2026
18 checks passed
@gfargo-horizon-agent
gfargo-horizon-agent Bot deleted the agent/coco-1062-extract-changelog-local-keymap-into-surf branch July 21, 2026 15:08
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.

0 participants