web: unify detail headers, queue follow-ups, move thinking outside bubbles
Every detail screen now owns one 44px chevron Back control beside its title. Sending appends the user's message immediately and keeps Send available beside Stop so a follow-up can be queued. Reasoning renders above the answer bubble rather than inside it.
This commit is contained in:
+23
-14
@@ -44,7 +44,7 @@ import {
|
||||
SearchSequencer,
|
||||
} from "./search.js";
|
||||
import { DecisionDraft, pendingDecision } from "./actions.js";
|
||||
import { h } from "./dom.js";
|
||||
import { backChevronIcon, h } from "./dom.js";
|
||||
import { createModalController } from "./modal.js";
|
||||
import { describeError, isExecuting } from "./format.js";
|
||||
import {
|
||||
@@ -974,19 +974,17 @@ function listSubtitle(view) {
|
||||
}
|
||||
}
|
||||
|
||||
function backControl(view) {
|
||||
function backButton(view) {
|
||||
return h(
|
||||
"div",
|
||||
{ class: "pane-back" },
|
||||
h(
|
||||
"button",
|
||||
{
|
||||
type: "button",
|
||||
onclick: () => closeDetail(view),
|
||||
},
|
||||
h("span", { "aria-hidden": "true", text: "\u2190" }),
|
||||
h("span", { text: "Back to list" }),
|
||||
),
|
||||
"button",
|
||||
{
|
||||
class: "ghost back-button",
|
||||
type: "button",
|
||||
"aria-label": "Back to list",
|
||||
title: "Back to list",
|
||||
onclick: () => closeDetail(view),
|
||||
},
|
||||
backChevronIcon(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1076,7 +1074,18 @@ function focusDetailHeading() {
|
||||
|
||||
function detailPaneFor(view, body, { detailOpen, tabs }) {
|
||||
const pane = h("section", { class: "detail-pane", "aria-label": `${view} detail` });
|
||||
if (detailOpen) pane.append(backControl(view));
|
||||
if (detailOpen) {
|
||||
// One header for every detail screen: the same chevron control on the left
|
||||
// and the screen's own h1 beside it, vertically centred. The title leaves the
|
||||
// scroller so it cannot drift away from the control.
|
||||
const header = h("div", { class: "detail-head" }, backButton(view));
|
||||
const title = body.querySelector("#detailTitle");
|
||||
if (title) {
|
||||
title.remove();
|
||||
header.append(title);
|
||||
}
|
||||
pane.append(header);
|
||||
}
|
||||
const scroll = h("div", {
|
||||
id: "detail-panel",
|
||||
class: "pane-scroll",
|
||||
|
||||
Reference in New Issue
Block a user