feat(webui): stabilize session transitions and goal presentation
Keep the composer stable during interruptible session changes. Move active and blocked goals into the header with localized gallery previews, and preserve focus when overlays close. Include the reviewed navigation, layout and accessibility fixes.
This commit is contained in:
1 parent
e65bec9a6e
commit
ce3f36983d
58 files changed
+1874
-453
No files matched your search
@@ -6,6 +6,7 @@ import { AgentActivityCluster } from "@/components/thread/AgentActivityCluster";
|
||||
import { ComposerUsagePopover, type ComposerRoundUsage } from "@/components/thread/ComposerUsagePopover";
|
||||
import type { ContextSnapshot } from "@/lib/types";
|
||||
import { ContextCompactionNotice } from "@/components/thread/ContextCompactionNotice";
|
||||
import { GoalIsland } from "@/components/thread/GoalIsland";
|
||||
import { ModelFallbackNotice } from "@/components/thread/ModelFallbackNotice";
|
||||
import { SandboxNotice, type SandboxIssue } from "@/components/thread/SandboxNotice";
|
||||
import { ModelPresetBadge, type ModelPresetOption } from "@/components/thread/ModelPresetBadge";
|
||||
@@ -89,6 +90,18 @@ function ComposerPreview() {
|
||||
</div>;
|
||||
}
|
||||
|
||||
function GoalPreview() {
|
||||
const { t } = useGalleryTranslation();
|
||||
const [status, setStatus] = useState<"active" | "blocked">("active");
|
||||
return <div>
|
||||
<StatePicker label={t("previews.goal.state")} value={status} options={["active", "blocked"]} onChange={setStatus} />
|
||||
<div className="thread-header-container relative h-56 overflow-hidden rounded-control border bg-background">
|
||||
<GoalIsland goal={{ active: status === "active", status, ui_summary: t("previews.goal.summary"), objective: t("previews.goal.objective"),
|
||||
...(status === "blocked" ? { recap: t("previews.goal.recap") } : {}) }} />
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
||||
function ModelPresetPreview() {
|
||||
const { t } = useTranslation();
|
||||
const { t: g } = useGalleryTranslation();
|
||||
@@ -343,6 +356,9 @@ function ResponseSourcesPreview() {
|
||||
|
||||
const components = "webui/src/components/";
|
||||
export const conversationExamples: ComponentExample[] = [
|
||||
{ title: "previews.goal.title", files: ["thread/GoalIsland"], Preview: GoalPreview,
|
||||
description: "previews.goal.description", options: "previews.goal.options",
|
||||
code: '<GoalIsland goal={{ active: true, status: "active", ui_summary: summary, objective }} />' },
|
||||
{ title: "previews.composer.title", files: ["thread/ThreadComposer"], Preview: ComposerPreview,
|
||||
description: "previews.composer.description", options: "previews.composer.options",
|
||||
code: '<ThreadComposer onSend={send} modelPresets={presets} onModelPresetChange={setPreset} slashCommands={commands} />' },
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · Goal",
|
||||
"description": "Preview the goal and its details.",
|
||||
"options": "Pass the goal status, summary, objective and optional recap.",
|
||||
"state": "Status",
|
||||
"summary": "Prepare the release",
|
||||
"objective": "Review the changes and verify the release.\n\n- Check tests\n- Review documentation\n- Confirm readiness",
|
||||
"recap": "Waiting for approval."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · Rename groups and projects",
|
||||
"description": "Try the rename dialog for groups and projects. Topics are renamed inline in the chat list.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · Objetivo",
|
||||
"description": "Previsualiza el objetivo y sus detalles.",
|
||||
"options": "Proporciona el estado, resumen, objetivo y un avance opcional.",
|
||||
"state": "Estado",
|
||||
"summary": "Preparar la versión",
|
||||
"objective": "Revisa los cambios y verifica la versión.\n\n- Comprobar las pruebas\n- Revisar la documentación\n- Confirmar que está lista",
|
||||
"recap": "Esperando aprobación."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · Renombrar grupos y proyectos",
|
||||
"description": "Prueba el cambio de nombre de grupos y proyectos. Los temas se renombran en la lista de chats.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · Objectif",
|
||||
"description": "Prévisualisez l’objectif et ses détails.",
|
||||
"options": "Fournissez l’état, le résumé, l’objectif et un bilan facultatif.",
|
||||
"state": "État",
|
||||
"summary": "Préparer la publication",
|
||||
"objective": "Examinez les modifications et vérifiez la publication.\n\n- Vérifier les tests\n- Relire la documentation\n- Confirmer que tout est prêt",
|
||||
"recap": "En attente d’approbation."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · Renommer groupes et projets",
|
||||
"description": "Essayez le renommage des groupes et projets. Les sujets se renomment dans la liste des discussions.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · Tujuan",
|
||||
"description": "Pratinjau tujuan dan detailnya.",
|
||||
"options": "Berikan status, ringkasan, tujuan, dan laporan opsional.",
|
||||
"state": "Status",
|
||||
"summary": "Siapkan rilis",
|
||||
"objective": "Tinjau perubahan dan verifikasi rilis.\n\n- Periksa pengujian\n- Tinjau dokumentasi\n- Pastikan rilis siap",
|
||||
"recap": "Menunggu persetujuan."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · Ubah nama grup dan proyek",
|
||||
"description": "Coba dialog pengubahan nama grup dan proyek. Nama topik diubah langsung di daftar percakapan.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · 目標",
|
||||
"description": "目標と詳細をプレビューします。",
|
||||
"options": "目標の状態、要約、内容、任意の進捗を渡します。",
|
||||
"state": "状態",
|
||||
"summary": "リリースの準備",
|
||||
"objective": "変更を確認し、リリースを検証します。\n\n- テストを確認\n- ドキュメントを確認\n- リリースの準備を確認",
|
||||
"recap": "承認待ち。"
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · グループとプロジェクトの名前変更",
|
||||
"description": "グループとプロジェクトの名前変更を試せます。トピック名はチャット一覧内で変更します。",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · 목표",
|
||||
"description": "목표와 세부 내용을 미리 봅니다.",
|
||||
"options": "목표 상태, 요약, 내용 및 선택적 진행 내용을 전달합니다.",
|
||||
"state": "상태",
|
||||
"summary": "릴리스 준비",
|
||||
"objective": "변경 사항을 검토하고 릴리스를 검증합니다.\n\n- 테스트 확인\n- 문서 검토\n- 릴리스 준비 확인",
|
||||
"recap": "승인 대기 중."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · 그룹 및 프로젝트 이름 변경",
|
||||
"description": "그룹과 프로젝트의 이름 변경을 시험합니다. 주제 이름은 채팅 목록에서 바로 바꿉니다.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · Objetivo",
|
||||
"description": "Visualize o objetivo e seus detalhes.",
|
||||
"options": "Informe o estado, resumo, objetivo e um balanço opcional.",
|
||||
"state": "Estado",
|
||||
"summary": "Preparar o lançamento",
|
||||
"objective": "Revise as alterações e verifique o lançamento.\n\n- Verificar os testes\n- Revisar a documentação\n- Confirmar que está pronto",
|
||||
"recap": "Aguardando aprovação."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · Renomear grupos e projetos",
|
||||
"description": "Teste a renomeação de grupos e projetos. Os tópicos são renomeados na lista de conversas.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · Mục tiêu",
|
||||
"description": "Xem trước mục tiêu và chi tiết.",
|
||||
"options": "Truyền trạng thái, tóm tắt, mục tiêu và báo cáo tùy chọn.",
|
||||
"state": "Trạng thái",
|
||||
"summary": "Chuẩn bị phát hành",
|
||||
"objective": "Xem lại thay đổi và xác minh bản phát hành.\n\n- Kiểm tra thử nghiệm\n- Xem lại tài liệu\n- Xác nhận sẵn sàng",
|
||||
"recap": "Đang chờ phê duyệt."
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · Đổi tên nhóm và dự án",
|
||||
"description": "Thử hộp thoại đổi tên nhóm và dự án. Chủ đề được đổi tên ngay trong danh sách trò chuyện.",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · 目标",
|
||||
"description": "预览目标及其详情。",
|
||||
"options": "传入目标状态、摘要、内容及可选的进展说明。",
|
||||
"state": "状态",
|
||||
"summary": "准备发布",
|
||||
"objective": "检查变更并验证发布。\n\n- 检查测试\n- 审阅文档\n- 确认发布准备就绪",
|
||||
"recap": "等待批准。"
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · 分组与项目改名",
|
||||
"description": "预览分组和项目改名;话题在列表行内改名。",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"goal": {
|
||||
"title": "GoalIsland · 目標",
|
||||
"description": "預覽目標及其詳情。",
|
||||
"options": "傳入目標狀態、摘要、內容及選用的進度說明。",
|
||||
"state": "狀態",
|
||||
"summary": "準備發布",
|
||||
"objective": "檢查變更並驗證發布。\n\n- 檢查測試\n- 審閱文件\n- 確認發布準備就緒",
|
||||
"recap": "等待批准。"
|
||||
},
|
||||
"rename": {
|
||||
"title": "RenameDialog · 群組與專案改名",
|
||||
"description": "預覽群組與專案改名;話題在清單內改名。",
|
||||
|
||||
Reference in new issue
Block a user