Auto-open the next decision's detail pane after Approve/Reject (D-0060) #141

Merged
hannah-vernon merged 1 commit from feature/decisions-auto-open-detail into dev 2026-09-27 12:31:45 -05:00
Owner

What does this PR do?

UX improvement to the /decisions review flow. After an operator clicks Approve or Reject, the page already advances to the next still-reviewable row (the review POST redirects to #decision-<id> via BuildReviewReturnAnchors/ReviewReturnTo). This PR makes that next row's rationale/associated-events detail pane open automatically, so the operator has the full context needed to approve or reject without clicking the "+" toggle (D-0060).

decision-rationale-toggle.js now reads the URL fragment on load (DOMContentLoaded and hashchange), and the per-row click handler and the new fragment handler share a single setExpanded(key, expanded) helper. The fragment match excludes the detail row's own #decision-rationale-<id> id and no-ops when the target row has no detail pane.

Client-side presentation only: no endpoint contract, persisted state, or configuration value changes; the manual "+" toggle behaviour is unchanged.

Fixes #

How was this tested?

  • dotnet build - no server code changed (JS asset only); the file is served directly via Assets[...], so there is no compile step for it
  • dotnet test - not applicable (no automated JS test harness in the repo)
  • Manually tested on ___ (please verify in a browser: Approve/Reject advances and opens the next row's detail pane)

Checklist

  • I have read the Contributing Guide
  • Changes are focused - one logical change per PR
  • Documentation updated (DECISIONS.md D-0060, AGENT-README.md Changes entry + range bumped to D-0060)
  • New dependencies are MIT/Apache-2.0/BSD, security-vetted, and recorded in THIRD-PARTY-NOTICES.md (no new dependencies)
  • No secrets, credentials, or real infrastructure identifiers in the diff
  • No commented-out code or debug leftovers
## What does this PR do? UX improvement to the `/decisions` review flow. After an operator clicks Approve or Reject, the page already advances to the next still-reviewable row (the review POST redirects to `#decision-<id>` via `BuildReviewReturnAnchors`/`ReviewReturnTo`). This PR makes that next row's rationale/associated-events detail pane open automatically, so the operator has the full context needed to approve or reject without clicking the "+" toggle (D-0060). `decision-rationale-toggle.js` now reads the URL fragment on load (`DOMContentLoaded` and `hashchange`), and the per-row click handler and the new fragment handler share a single `setExpanded(key, expanded)` helper. The fragment match excludes the detail row's own `#decision-rationale-<id>` id and no-ops when the target row has no detail pane. Client-side presentation only: no endpoint contract, persisted state, or configuration value changes; the manual "+" toggle behaviour is unchanged. Fixes # ## How was this tested? - [x] `dotnet build` - no server code changed (JS asset only); the file is served directly via `Assets[...]`, so there is no compile step for it - [ ] `dotnet test` - not applicable (no automated JS test harness in the repo) - [ ] Manually tested on ___ (please verify in a browser: Approve/Reject advances and opens the next row's detail pane) ## Checklist - [x] I have read the Contributing Guide - [x] Changes are focused - one logical change per PR - [x] Documentation updated (DECISIONS.md D-0060, AGENT-README.md Changes entry + range bumped to D-0060) - [x] New dependencies are MIT/Apache-2.0/BSD, security-vetted, and recorded in THIRD-PARTY-NOTICES.md (no new dependencies) - [x] No secrets, credentials, or real infrastructure identifiers in the diff - [x] No commented-out code or debug leftovers
After an operator approves or rejects a decision on /decisions, the
review POST already redirects to #decision-<id> for the next
still-reviewable row. decision-rationale-toggle.js now reads that
fragment on load (DOMContentLoaded and hashchange) and opens that
row's rationale/associated-events detail pane automatically, so the
operator lands on the next item with full context visible without
clicking "+".

The per-row click handler and the fragment handler share a single
setExpanded(key, expanded) helper. The fragment match excludes the
detail row's own #decision-rationale-<id> id and no-ops when the
target row has no detail pane. Client-side presentation only: no
endpoint contract, persisted state, or configuration value changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hannah-vernon/viegard-sentinel!141
No description provided.