fix(autoresearch): replace swarm review modal with inline panel#54
Merged
Conversation
…lab_mode - Swarm Review modal: add max-height + internal scroll so the body is maneuverable on short viewports (footer pinned). - Goal entry: collapse the inline empty-state form to a single "Set Research Goal" button that opens the existing modal — one place to enter a goal instead of two. - Reset Goal: new button on the cockpit wired to POST /api/research/reset (clears current + archives). - Move "Swarm Draft Ready" banner below the cockpit (was redundant at the top above the active-goal row). - Review Draft: re-fetch /api/goal/preview on click so a stale banner doesn't silently no-op; hide + refreshAll if the server has no pending preview. - LAB_MODE consistency: route all read sites through _lab_mode() (was mixing LAB_MODE / ARAIL_MODE / LAB_NETWORK_MODE) and have both toggle endpoints write to BOTH env vars + .env, so every tab sees the same airgapped/hybrid state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-record
fetchGoalPreview now requires status=='preview' and a swarm object before
treating a /api/goal/preview response as a reviewable draft. Without this,
residual records (e.g. {status:'approved'} left on disk by older code
paths) would render the banner but the Review Draft modal had nothing
valid to open. Tightening the validator hides the banner cleanly when no
real draft is pending.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The modal-based Review Draft surface kept hitting display/CSS edge cases (z-index, hidden card, scroll trap). Swap it for an inline panel that lives right under the Swarm Draft Ready banner — same content, same actions (Approve & Run, Approve Only, Discard, Hide), no modal layout. Click Review Draft → panel reveals and scrolls into view. Guaranteed visible because it's a normal section in the page flow. Also relaxes fetchGoalPreview to render whatever non-empty preview the server returns, so half-records still surface for the user to discard explicitly instead of silently no-op'ing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-swarm-review # Conflicts: # src/arail/portal/templates/research.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchGoalPreviewto render any non-empty preview the server returns, so half-records still surface for explicit Discard instead of silently no-op'ing.Test plan
/autoresearchwith a pending swarm draft → click Review Draft → inline panel appears with workers, phases, checklist.🤖 Generated with Claude Code