wizards: unlock '+' buttons when roster is empty
The 'no agents → button disabled' guard hard-locked the wizard behind an already-populated roster, forcing users to detour to the Agents page and come back. NoAgentsGate already handles the empty state gracefully inside the wizard body; the button just needed to open it. Applied to both ResearchList and LoopsList. Follow-up (design in progress): let the wizard auto-provision a team from the topic/loop itself so users never have to leave to create agents.
This commit is contained in:
@@ -148,20 +148,17 @@ export function LoopsList({
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setWizardOpen(true)}
|
onClick={() => setWizardOpen(true)}
|
||||||
disabled={noAgents}
|
title="New loop"
|
||||||
title={noAgents ? "Add an agent to your roster first" : "New loop"}
|
|
||||||
aria-label="New loop"
|
aria-label="New loop"
|
||||||
style={{
|
style={{
|
||||||
flex: "none",
|
flex: "none",
|
||||||
width: 34,
|
width: 34,
|
||||||
height: 34,
|
height: 34,
|
||||||
borderRadius: 9,
|
borderRadius: 9,
|
||||||
border: `1px dashed ${noAgents ? "rgba(255,255,255,.14)" : "rgba(255,111,97,.4)"}`,
|
border: "1px dashed rgba(255,111,97,.4)",
|
||||||
background: noAgents
|
background: "rgba(255,111,97,.06)",
|
||||||
? "rgba(255,255,255,.02)"
|
color: "#ff6f61",
|
||||||
: "rgba(255,111,97,.06)",
|
cursor: "pointer",
|
||||||
color: noAgents ? "#5a5a62" : "#ff6f61",
|
|
||||||
cursor: noAgents ? "not-allowed" : "pointer",
|
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
|
|||||||
@@ -173,25 +173,17 @@ export function ResearchList({
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setWizardOpen(true)}
|
onClick={() => setWizardOpen(true)}
|
||||||
disabled={agents.length === 0}
|
title="New research topic"
|
||||||
title={
|
|
||||||
agents.length === 0
|
|
||||||
? "Add an agent to your roster first"
|
|
||||||
: "New research topic"
|
|
||||||
}
|
|
||||||
aria-label="New research topic"
|
aria-label="New research topic"
|
||||||
style={{
|
style={{
|
||||||
flex: "none",
|
flex: "none",
|
||||||
width: 34,
|
width: 34,
|
||||||
height: 34,
|
height: 34,
|
||||||
borderRadius: 9,
|
borderRadius: 9,
|
||||||
border: `1px dashed ${agents.length === 0 ? "rgba(255,255,255,.14)" : "rgba(255,111,97,.4)"}`,
|
border: "1px dashed rgba(255,111,97,.4)",
|
||||||
background:
|
background: "rgba(255,111,97,.06)",
|
||||||
agents.length === 0
|
color: "#ff6f61",
|
||||||
? "rgba(255,255,255,.02)"
|
cursor: "pointer",
|
||||||
: "rgba(255,111,97,.06)",
|
|
||||||
color: agents.length === 0 ? "#5a5a62" : "#ff6f61",
|
|
||||||
cursor: agents.length === 0 ? "not-allowed" : "pointer",
|
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
|
|||||||
Reference in New Issue
Block a user