feat(panel): graduate Modern UI as default, default language to system, and fix 5h quota boundary

This commit is contained in:
fish
2026-11-20 23:29:56 +09:00
parent ab4caf39a6
commit 55320df9b7
24 changed files with 590 additions and 165 deletions
@@ -21,7 +21,7 @@ import {
PANEL_SCALE_FACTORS,
applyAppearanceToRoot,
normalizeClientFontScale,
normalizeClientModernUi,
resolveSettingsModernUi,
} from '../../core/appearance.js';
import {
h,
@@ -1468,7 +1468,7 @@ export function mountWindowOverlay() {
applyAppearanceToRoot(capsuleHost, settings, { includeFontScale: false });
applyAppearanceToRoot(portalHost, settings, { includeFontScale: true });
const scaleKey = normalizeClientFontScale(settings?.fontScale);
const isModernUi = normalizeClientModernUi(settings?.experimentalModernUi);
const isModernUi = resolveSettingsModernUi(settings);
const colorScheme = portalHost.getAttribute?.('data-color-scheme') || 'light';
for (const el of [popoverEl, hoverTipEl, multiPanelEl]) {
if (el.getAttribute?.('data-font-scale') !== scaleKey) {
@@ -98,6 +98,7 @@ export function patchCapsuleOdometerText(
if (!isModern || !/\d/.test(nextStr)) {
if (prev?.active) {
el.textContent = '';
while (el.firstChild) el.removeChild(el.firstChild);
patchAttr(el, 'data-od-active', null);
patchAttr(el, 'data-od-value', null);
@@ -114,6 +115,7 @@ export function patchCapsuleOdometerText(
let nodes;
if (!prev?.active || prev.resetKey !== resetKey || !(prev.nodes instanceof Map)) {
el.textContent = '';
while (el.firstChild) el.removeChild(el.firstChild);
nodes = new Map();
} else {
@@ -472,10 +474,6 @@ export const CapsuleBarWidget = defineComponent({
'div',
{ className: 'preview-host-left is-composer', hidden: true },
[
h('span', { className: 'preview-composer-chip' }, [
h('span', { text: 'Auto' }),
createSvgIcon('chevron-down', { size: 10 }),
]),
h('span', { className: 'preview-composer-chip' }, [
h('span', { text: 'Carbon (High)' }),
createSvgIcon('chevron-down', { size: 10 }),