Skip to content

fix(autoresearch): simplify goal entry, fix swarm review modal, sync lab_mode#53

Merged
cdarnell merged 2 commits into
mainfrom
qukaizen/arail-autoresearch-goal-simplify
May 16, 2026
Merged

fix(autoresearch): simplify goal entry, fix swarm review modal, sync lab_mode#53
cdarnell merged 2 commits into
mainfrom
qukaizen/arail-autoresearch-goal-simplify

Conversation

@cdarnell
Copy link
Copy Markdown
Owner

Summary

  • Swarm Review modal now has max-height + internal scroll so it's maneuverable on short viewports; footer buttons stay pinned.
  • Goal entry is consolidated to a single modal — replaced the inline empty-state form with one "Set Research Goal" button.
  • Reset Goal button added to the cockpit, wired to existing POST /api/research/reset.
  • Banner repositioning — "Swarm Draft Ready" moved below the cockpit (was redundant above the active-goal row).
  • Review Draft fix — re-fetches /api/goal/preview on click so a stale banner doesn't silently no-op; hides + refreshes when the server has no pending preview.
  • LAB_MODE consistency — all read sites route through _lab_mode() (codebase was mixing LAB_MODE / ARAIL_MODE / LAB_NETWORK_MODE); both toggle endpoints now write to BOTH env vars + .env so every tab sees the same airgapped/hybrid state.

Test plan

  • Hard-refresh /autoresearch; empty state shows a single "Set Research Goal" button.
  • Open the modal, submit a goal, swarm review modal opens; resize browser to ~600px tall and confirm internal scroll works and the footer stays visible.
  • Approve → goal runs; the Swarm Draft Ready banner now sits below the cockpit.
  • Click "Reset Goal" → confirm prompt → empty state returns.
  • Toggle airgapped ⇄ hybrid; verify the pill matches on Dashboard, Chat, Autoresearch, Knowledge, Agents tabs.

🤖 Generated with Claude Code

cdarnell and others added 2 commits May 16, 2026 15:27
…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>
@cdarnell cdarnell merged commit 98e7b07 into main May 16, 2026
2 checks passed
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