惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
WordPress大学
WordPress大学
博客园_首页
罗磊的独立博客
D
Docker
N
Netflix TechBlog - Medium
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
D
DataBreaches.Net
I
InfoQ
L
LangChain Blog
GbyAI
GbyAI
V
V2EX
博客园 - 聂微东
P
Proofpoint News Feed
博客园 - 【当耐特】
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
U
Unit 42
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(control-ui): keep mobile chat settings in Lit state ·...
BunsDev · 2026-04-30 · via Recent Commits to openclaw:main

@@ -220,6 +220,8 @@ export class OpenClawApp extends LitElement {

220220

@state() realtimeTalkTranscript: string | null = null;

221221

private realtimeTalkSession: RealtimeTalkSession | null = null;

222222

@state() chatManualRefreshInFlight = false;

223+

@state() chatMobileControlsOpen = false;

224+

private chatMobileControlsTrigger: HTMLElement | null = null;

223225

@state() navDrawerOpen = false;

224226225227

onSlashAction?: (action: string) => void;

@@ -578,6 +580,23 @@ export class OpenClawApp extends LitElement {

578580

}

579581

}

580582

};

583+

private chatMobileControlsKeydownHandler = (e: KeyboardEvent) => {

584+

if (e.key !== "Escape" || !this.chatMobileControlsOpen) {

585+

return;

586+

}

587+

e.preventDefault();

588+

this.setChatMobileControlsOpen(false, { restoreFocus: true });

589+

};

590+

private chatMobileControlsPointerdownHandler = (e: Event) => {

591+

if (!this.chatMobileControlsOpen) {

592+

return;

593+

}

594+

const wrapper = this.querySelector(".chat-mobile-controls-wrapper");

595+

if (wrapper && e.composedPath().includes(wrapper)) {

596+

return;

597+

}

598+

this.setChatMobileControlsOpen(false);

599+

};

581600582601

createRenderRoot() {

583602

return this;

@@ -603,6 +622,8 @@ export class OpenClawApp extends LitElement {

603622

}

604623

};

605624

document.addEventListener("keydown", this.globalKeydownHandler);

625+

document.addEventListener("keydown", this.chatMobileControlsKeydownHandler);

626+

document.addEventListener("pointerdown", this.chatMobileControlsPointerdownHandler);

606627

handleConnected(this as unknown as Parameters<typeof handleConnected>[0]);

607628

void this.initWebPushState();

608629

}

@@ -613,12 +634,19 @@ export class OpenClawApp extends LitElement {

613634614635

disconnectedCallback() {

615636

document.removeEventListener("keydown", this.globalKeydownHandler);

637+

document.removeEventListener("keydown", this.chatMobileControlsKeydownHandler);

638+

document.removeEventListener("pointerdown", this.chatMobileControlsPointerdownHandler);

639+

this.chatMobileControlsTrigger = null;

616640

handleDisconnected(this as unknown as Parameters<typeof handleDisconnected>[0]);

617641

super.disconnectedCallback();

618642

}

619643620644

protected updated(changed: Map<PropertyKey, unknown>) {

621645

handleUpdated(this as unknown as Parameters<typeof handleUpdated>[0], changed);

646+

// Some render callbacks assign tab directly while preparing nested panel state.

647+

if (changed.has("tab") && this.tab !== "chat" && this.chatMobileControlsOpen) {

648+

this.setChatMobileControlsOpen(false);

649+

}

622650

if (!changed.has("sessionKey") || this.agentsPanel !== "tools") {

623651

return;

624652

}

@@ -693,9 +721,35 @@ export class OpenClawApp extends LitElement {

693721694722

setTab(next: Tab) {

695723

setTabInternal(this as unknown as Parameters<typeof setTabInternal>[0], next);

724+

if (next !== "chat") {

725+

this.setChatMobileControlsOpen(false);

726+

}

696727

this.navDrawerOpen = false;

697728

}

698729730+

setChatMobileControlsOpen(

731+

open: boolean,

732+

options?: { trigger?: HTMLElement | null; restoreFocus?: boolean },

733+

) {

734+

if (open) {

735+

this.chatMobileControlsTrigger = options?.trigger ?? this.chatMobileControlsTrigger;

736+

this.chatMobileControlsOpen = true;

737+

return;

738+

}

739+740+

const focusTarget = options?.restoreFocus ? this.chatMobileControlsTrigger : null;

741+

this.chatMobileControlsOpen = false;

742+

this.chatMobileControlsTrigger = null;

743+

if (!(focusTarget instanceof HTMLElement) || !focusTarget.isConnected) {

744+

return;

745+

}

746+

requestAnimationFrame(() => {

747+

if (focusTarget.isConnected) {

748+

focusTarget.focus();

749+

}

750+

});

751+

}

752+699753

setTheme(next: ThemeName, context?: Parameters<typeof setThemeInternal>[2]) {

700754

setThemeInternal(this as unknown as Parameters<typeof setThemeInternal>[0], next, context);

701755

this.themeOrder = this.buildThemeOrder(next);