style(lanes): render the create-readme option as a selectable card

Matches LaneStripCard's selected/unselected treatment and moves the hint
inside the card. Drops the "codex has no slash commands" clause from the
hint — the option is already hidden for a codex lane.
This commit is contained in:
2026-09-14 13:10:16 +07:00
parent ee1e07bb5e
commit c4025cd2f7
3 changed files with 31 additions and 14 deletions
+29 -12
View File
@@ -408,18 +408,35 @@ export function AddLaneModal({
</div>
{tool === "claude" && (
<div>
<label className="flex items-center gap-2 text-xs text-fg-secondary">
<input
type="checkbox"
checked={writeDocs}
onChange={(e) => setWriteDocs(e.target.checked)}
className="h-3.5 w-3.5 accent-accent"
/>
{t("addLaneWriteDocsLabel")}
</label>
<p className="mt-1 text-[10px] text-fg-muted">{t("addLaneWriteDocsHint")}</p>
</div>
<label
// Card that lights up when ticked, matching LaneStripCard's
// selected/unselected treatment.
className={`flex cursor-pointer items-start gap-2.5 rounded-lg border p-3 shadow-sm transition-colors ${
writeDocs
? "border-accent bg-accent/10"
: "border-border bg-surface-2 hover:border-border-light hover:bg-surface-3"
}`}
>
<input
type="checkbox"
// The wrapping label also holds the hint, so name the input
// itself — otherwise its accessible name is label + hint.
aria-label={t("addLaneWriteDocsLabel")}
checked={writeDocs}
onChange={(e) => setWriteDocs(e.target.checked)}
className="mt-0.5 h-3.5 w-3.5 shrink-0 accent-accent"
/>
<span>
<span
className={`block text-xs font-medium ${writeDocs ? "text-accent" : "text-fg-secondary"}`}
>
{t("addLaneWriteDocsLabel")}
</span>
<span className="mt-1 block text-[10px] text-fg-muted">
{t("addLaneWriteDocsHint")}
</span>
</span>
</label>
)}
{mode === "worktree" && branches && (