feat(FN-1292): consolidate InlineCreateCard controls into single row

- Refactor InlineCreateCard to display all action buttons (Plan, Subtask, Deps, Agent, Browser Verify, Preset, Models, Save) in one consolidated footer row
- Remove the separate inline-create-description-actions CSS class and associated styles
- Update InlineCreateCard tests to reflect the new consolidated control layout
- Update AGENTS.md documentation for InlineCreateCard controls description
- Update memory file with implementation notes
This commit is contained in:
gsxdsm
2026-04-08 20:48:08 -07:00
parent 10322615e2
commit a3598c1661
5 changed files with 118 additions and 74 deletions

View File

@@ -612,33 +612,6 @@ export function InlineCreateCard({
{isExpanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
</button>
</div>
{/* AI-assisted refinement actions — always visible when expanded */}
{isExpanded && !submitting && (
<div className="inline-create-description-actions" data-testid="inline-create-description-actions">
<button
type="button"
className="btn btn-sm"
onClick={handlePlanClick}
disabled={!description.trim()}
data-testid="plan-button"
title="Open planning mode with current description"
>
<Lightbulb size={12} style={{ verticalAlign: "middle", marginRight: 4 }} />
Plan
</button>
<button
type="button"
className="btn btn-sm"
onClick={handleSubtaskClick}
disabled={!description.trim()}
data-testid="subtask-button"
title="Break down into AI-generated subtasks"
>
<ListTree size={12} style={{ verticalAlign: "middle", marginRight: 4 }} />
Subtask
</button>
</div>
)}
{pendingImages.length > 0 && (
<div className="inline-create-previews">
{pendingImages.map((img, i) => (
@@ -660,6 +633,30 @@ export function InlineCreateCard({
{isExpanded && (
<div id="inline-create-controls" className="inline-create-footer">
<div className="inline-create-controls">
<button
type="button"
className="btn btn-sm"
onClick={handlePlanClick}
onMouseDown={(e) => e.preventDefault()}
disabled={!description.trim()}
data-testid="plan-button"
title="Open planning mode with current description"
>
<Lightbulb size={12} style={{ verticalAlign: "middle", marginRight: 4 }} />
Plan
</button>
<button
type="button"
className="btn btn-sm"
onClick={handleSubtaskClick}
onMouseDown={(e) => e.preventDefault()}
disabled={!description.trim()}
data-testid="subtask-button"
title="Break down into AI-generated subtasks"
>
<ListTree size={12} style={{ verticalAlign: "middle", marginRight: 4 }} />
Subtask
</button>
<div className="dep-trigger-wrap">
<button
type="button"

View File

@@ -857,52 +857,44 @@ describe("InlineCreateCard button visibility when collapsed", () => {
});
});
describe("Description-adjacent actions layout (FN-781)", () => {
it("renders Plan and Subtask in description-actions area when expanded", () => {
describe("Consolidated controls layout (FN-781, FN-1292)", () => {
it("renders Plan, Subtask, Deps, Agent, and Models together in footer controls when expanded", () => {
renderCard();
expandCard();
// The description-actions container should exist
expect(screen.getByTestId("inline-create-description-actions")).toBeTruthy();
// All buttons should be in the footer controls row
const controlsRow = document.querySelector(".inline-create-controls");
expect(controlsRow).toBeTruthy();
// Plan and Subtask buttons should be inside it
const actionsContainer = screen.getByTestId("inline-create-description-actions");
expect(actionsContainer.contains(screen.getByTestId("plan-button"))).toBe(true);
expect(actionsContainer.contains(screen.getByTestId("subtask-button"))).toBe(true);
// Plan, Subtask, Deps, Agent, Browser Verify, Preset, Models all in one row
expect(controlsRow!.contains(screen.getByTestId("plan-button"))).toBe(true);
expect(controlsRow!.contains(screen.getByTestId("subtask-button"))).toBe(true);
expect(controlsRow!.contains(screen.getByTestId("inline-create-agent-button"))).toBe(true);
const depsButton = screen.getByText(/Deps/);
expect(controlsRow!.contains(depsButton)).toBe(true);
const modelsButton = screen.getByRole("button", { name: /Models/i });
expect(controlsRow!.contains(modelsButton)).toBe(true);
});
it("does not render description-actions when not expanded", () => {
it("does not render footer controls when not expanded", () => {
renderCard();
// Description actions should not exist when collapsed
expect(screen.queryByTestId("inline-create-description-actions")).toBeNull();
// Footer controls should not exist when collapsed
expect(document.querySelector(".inline-create-controls")).toBeNull();
});
it("Save button remains in footer area, not description-actions", () => {
it("Save button remains in footer actions area, separate from controls row", () => {
renderCard();
expandCard();
const actionsContainer = screen.getByTestId("inline-create-description-actions");
const controlsRow = document.querySelector(".inline-create-controls");
const saveButton = screen.getByTestId("save-button");
// Save button should NOT be in the description-actions area
expect(actionsContainer.contains(saveButton)).toBe(false);
// Save button should NOT be in the controls row (it's in inline-create-actions)
expect(controlsRow!.contains(saveButton)).toBe(false);
});
it("Deps, Preset, Models buttons remain in footer area, not description-actions", () => {
renderCard();
expandCard();
const actionsContainer = screen.getByTestId("inline-create-description-actions");
const depsButton = screen.getByText(/Deps/);
const modelsButton = screen.getByRole("button", { name: /Models/i });
// Deps and Models should NOT be in the description-actions area
expect(actionsContainer.contains(depsButton)).toBe(false);
expect(actionsContainer.contains(modelsButton)).toBe(false);
});
it("Plan and Subtask disabled state still works in description-actions", () => {
it("Plan and Subtask disabled state still works in consolidated controls", () => {
renderCard();
expandCard();
const textarea = screen.getByPlaceholderText("What needs to be done?");

View File

@@ -5083,14 +5083,6 @@ body {
flex-wrap: wrap;
}
/* AI-assisted description actions — sits between textarea and expanded controls */
.inline-create-description-actions {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.inline-create-controls {
display: flex;
align-items: center;
@@ -6093,11 +6085,6 @@ body {
flex-shrink: 0;
}
.inline-create-description-actions .btn {
min-height: 44px;
padding: var(--space-xs) var(--space-md);
}
/* Inline create: wrap footer controls at 280px */
.inline-create-controls {
flex-wrap: wrap;