Move routine title into header row, remove Automation label
The editable title now sits in the header alongside Run Now and the active/paused toggle, replacing the old "Automation" subheading. This removes the redundant label and gives the title top-level prominence in the routine detail view. Co-Authored-By: Paperclip <noreply@paperclip.ing> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8cc8540597
commit
4c6e8e6053
1 changed files with 53 additions and 71 deletions
|
|
@ -625,24 +625,40 @@ export function RoutineDetail() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="max-w-2xl space-y-6">
|
<div className="max-w-2xl space-y-6">
|
||||||
{/* Header: status + actions */}
|
{/* Header: editable title + actions */}
|
||||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
<div className="flex items-start gap-4">
|
||||||
<div className="space-y-1">
|
<textarea
|
||||||
{routine.activeIssue && (
|
ref={titleInputRef}
|
||||||
<Link
|
className="flex-1 min-w-0 resize-none overflow-hidden bg-transparent text-xl font-bold outline-none placeholder:text-muted-foreground/50"
|
||||||
to={`/issues/${routine.activeIssue.identifier ?? routine.activeIssue.id}`}
|
placeholder="Routine title"
|
||||||
className="inline-flex items-center gap-1 text-xs text-muted-foreground hover:underline"
|
rows={1}
|
||||||
>
|
value={editDraft.title}
|
||||||
<span>Current issue</span>
|
onChange={(event) => {
|
||||||
<span>{routine.activeIssue.identifier ?? routine.activeIssue.id.slice(0, 8)}</span>
|
setEditDraft((current) => ({ ...current, title: event.target.value }));
|
||||||
</Link>
|
autoResizeTextarea(event.target);
|
||||||
)}
|
}}
|
||||||
</div>
|
onKeyDown={(event) => {
|
||||||
<div className="flex flex-wrap items-center gap-3">
|
if (event.key === "Enter" && !event.metaKey && !event.ctrlKey && !event.nativeEvent.isComposing) {
|
||||||
|
event.preventDefault();
|
||||||
|
descriptionEditorRef.current?.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.key === "Tab" && !event.shiftKey) {
|
||||||
|
event.preventDefault();
|
||||||
|
if (editDraft.assigneeAgentId) {
|
||||||
|
if (editDraft.projectId) {
|
||||||
|
descriptionEditorRef.current?.focus();
|
||||||
|
} else {
|
||||||
|
projectSelectorRef.current?.focus();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
assigneeSelectorRef.current?.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div className="flex shrink-0 items-center gap-3 pt-1">
|
||||||
<RunButton onClick={() => runRoutine.mutate()} disabled={runRoutine.isPending} />
|
<RunButton onClick={() => runRoutine.mutate()} disabled={runRoutine.isPending} />
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<span className="text-xs font-medium uppercase tracking-[0.18em] text-muted-foreground">Automation</span>
|
|
||||||
<div className="flex items-center gap-3">
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
role="switch"
|
role="switch"
|
||||||
|
|
@ -665,8 +681,6 @@ export function RoutineDetail() {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Secret message banner */}
|
{/* Secret message banner */}
|
||||||
{secretMessage && (
|
{secretMessage && (
|
||||||
|
|
@ -694,38 +708,6 @@ export function RoutineDetail() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Title */}
|
|
||||||
<textarea
|
|
||||||
ref={titleInputRef}
|
|
||||||
className="w-full resize-none overflow-hidden bg-transparent text-xl font-bold outline-none placeholder:text-muted-foreground/50"
|
|
||||||
placeholder="Routine title"
|
|
||||||
rows={1}
|
|
||||||
value={editDraft.title}
|
|
||||||
onChange={(event) => {
|
|
||||||
setEditDraft((current) => ({ ...current, title: event.target.value }));
|
|
||||||
autoResizeTextarea(event.target);
|
|
||||||
}}
|
|
||||||
onKeyDown={(event) => {
|
|
||||||
if (event.key === "Enter" && !event.metaKey && !event.ctrlKey && !event.nativeEvent.isComposing) {
|
|
||||||
event.preventDefault();
|
|
||||||
descriptionEditorRef.current?.focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (event.key === "Tab" && !event.shiftKey) {
|
|
||||||
event.preventDefault();
|
|
||||||
if (editDraft.assigneeAgentId) {
|
|
||||||
if (editDraft.projectId) {
|
|
||||||
descriptionEditorRef.current?.focus();
|
|
||||||
} else {
|
|
||||||
projectSelectorRef.current?.focus();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
assigneeSelectorRef.current?.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* Assignment row */}
|
{/* Assignment row */}
|
||||||
<div className="overflow-x-auto overscroll-x-contain">
|
<div className="overflow-x-auto overscroll-x-contain">
|
||||||
<div className="inline-flex min-w-full flex-wrap items-center gap-2 text-sm text-muted-foreground sm:min-w-max sm:flex-nowrap">
|
<div className="inline-flex min-w-full flex-wrap items-center gap-2 text-sm text-muted-foreground sm:min-w-max sm:flex-nowrap">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue