Repository navigation
fix(ui): pick nothing by default when taking over hooks from targets - #935
Conversation
The hooks import dialog is also where a hook is edited or removed in its
target file without importing it, but it opened with every hook ticked,
so managing removals could import the rest by accident. It now opens
with nothing selected, and its entry points are named for what they
show ("Hooks in targets", "Not managed yet") instead of "Import".
The review step stacked three scroll areas (dialog body, file list,
diff) and listed each removed hook three times. The dialog body is now
the only thing that scrolls, hook names are listed once, a file card
shows a count per action, and its diff opens on request. The other hook
previews share the component: their diffs still start open but lose the
inner scroll and gain the same toggle.
Adding or editing a hook now uses the same command cards as editing one
in a target: collapsible, with a multi-line editor that can be expanded.
A collapsed card with a missing field is marked. The variable buttons
append to the command there instead of inserting at the cursor.
A missing OpenCode CLI showed the raw exec error when reading its hooks;
it now says the command was not found and what to do.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The sync preview, Sync page and target hooks views show the same failure as a plan warning, wrapped as "target X: detect OpenCode API ...; its hook bindings are skipped". That form still put the raw exec error in parentheses. It now says the command was not found, that the bindings are skipped, and what to do. Other detection failures keep the existing message with the detail.
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
None. Maintainer feedback on the dashboard's hooks import flow.
What changes
Dashboard only (
ui/), plus one sentence in the hooks reference and its four translations.exec: "opencode": executable file not found in $PATH. The same failure shown as a plan warning (sync preview, Sync page, target hooks) gets a matching message.Behaviour changes to be aware of
HooksPreviewis shared, so the sync, save, remove and restore previews also lose their inner scroll areas and gain the show/hide diff toggle. Their diffs still start open.Not covered
Checks
Run in a devcontainer on this branch:
pnpm exec vitest runinui/: 112 files, 960 tests passedpnpm exec tsc -b: cleanpnpm run lint: 0 errors (53 existing warnings)python3 scripts/ai-context.py check: okNot run:
make check(no Go changes), the website build, E2E runbooks.pnpm run buildpassed before the last two rounds of edits and was not rerun after them.Checklist
make check) — UI tests pass;make checkwas not run, see Checks