From 798e55951b6cea6eb5437342938093fa98ac0f0e Mon Sep 17 00:00:00 2001 From: xavix-yo Date: Thu, 23 Jul 2026 18:03:28 +0100 Subject: [PATCH] =?UTF-8?q?ui:=20shape=20simplified=20interface=20?= =?UTF-8?q?=E2=80=94=20hide=20reasoning,=20show=20projects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/components/copilot-render.js | 7 ++++--- web/components/sidebar.js | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/web/components/copilot-render.js b/web/components/copilot-render.js index 67e53ee..42b5d0a 100644 --- a/web/components/copilot-render.js +++ b/web/components/copilot-render.js @@ -513,8 +513,9 @@ export function renderAttachmentChips(host, attachments, { removable = false } = * across re-renders, so a user-expanded block stays open while tokens stream * into it (live) and in past history items alike. */ -function renderReasoning(msg) { +function renderReasoning(host, msg) { if (!msg.reasoning) return nothing; + if (host?._me?.ui_mode === 'simple') return nothing; return html`
${t('chat.reasoning')} @@ -531,7 +532,7 @@ export function renderMsg(host, msg) { return html`
${msg.failed ? failedBadge() : nothing} - ${renderReasoning(msg)} + ${renderReasoning(host, msg)} ${unsafeHTML(renderMarkdown(msg.content))} ${msg.input_tokens != null ? html`
↑${msg.input_tokens.toLocaleString()} tok  ↓${msg.output_tokens?.toLocaleString()} tok
` : nothing}
`; @@ -539,7 +540,7 @@ export function renderMsg(host, msg) { return html`
${msg.failed ? failedBadge() : nothing} - ${renderReasoning(msg)} + ${renderReasoning(host, msg)} ${unsafeHTML(renderMarkdown(msg.content))} ${msg.streaming ? html`` : nothing} ${msg.input_tokens != null && !msg.streaming ? html`
↑${msg.input_tokens.toLocaleString()} tok  ↓${msg.output_tokens?.toLocaleString()} tok
` : nothing} diff --git a/web/components/sidebar.js b/web/components/sidebar.js index 57f535f..ffb4abf 100644 --- a/web/components/sidebar.js +++ b/web/components/sidebar.js @@ -62,6 +62,11 @@ const GROUPS = [ const COLLAPSE_KEY = 'sidebar-collapsed'; +// The projects NAV entry, surfaced in the simplified interface too (projects are +// membership-gated, not capability-gated, so a simple-mode member can own/share +// them just like anyone else). +const PROJECTS_NAV = NAV.find((i) => i.id === 'projects'); + export class AppSidebar extends I18nMixin(LightElement) { static properties = { @@ -437,7 +442,8 @@ export class AppSidebar extends I18nMixin(LightElement) { } render() { - // Simplified interface (role attrs `ui_mode: "simple"`): chat + inbox only, + // Simplified interface (role attrs `ui_mode: "simple"`): chat, inbox and + // projects (self-service workspaces — membership-gated, not capability-gated), // ungrouped. Hiding links is not access control — every route stays // capability-gated server-side; this only shapes the nav for less technical // members. @@ -452,7 +458,11 @@ export class AppSidebar extends I18nMixin(LightElement) { `;