DeepSeek-Reasonix icon indicating copy to clipboard operation
DeepSeek-Reasonix copied to clipboard

fix(desktop): Fix settings page responsive layout on narrow windows / 修复设置页窄窗口下的响应式布局

Open HaoyueQin opened this issue 4 months ago • 0 comments

Summary

This PR fixes three settings-page layout problems that appear when the window narrows to ≤900px (plus the 760–930px band for the subagents page):

  1. Settings model subtabs (Usage / Access / Stats) stretch to fill the whole row. The @media (max-width: 900px) rule for .settings-subtabs previously forced display: flex; width: 100% with horizontal scrolling. It now uses inline-flex; max-width: 100%; flex-wrap: wrap, so the pills shrink-wrap their content and wrap onto additional lines instead of stretching or scrolling.

  2. Memory page: the workspace selector and the Suggestions button get separated. The old narrow-window column layout put the project-name selector top-left and the suggestion button bottom-right; with a plain wrapping flex row, a short project name could also end up beside the memory tabs while the button dropped to its own line. The tab row now flows as a wrapping flex row where the four memory tabs (Saved memories / Archived memories / Instruction files / Activity) stay on their own compact line, and the workspace selector plus the Suggestions button are grouped in a dedicated memory-tabs-row__tail container (100% flex-basis) so they always share one line regardless of name length. The name prefers a single line and wraps naturally — overflow-wrap: anywhere, no truncation, no line-clamp — when the column is too narrow.

  3. Subagent page: built-in override cards overflow the settings column. .subagents-builtin-overrides used repeat(2, minmax(200px, 1fr)), whose 568px minimum overflowed the ~500–568px content column at 760–930px window widths. The columns now use minmax(0, 1fr) (keeping the existing single-column fallback at ≤760px), so the cards shrink with the column instead of being clipped.

Changes are limited to desktop/frontend (CSS plus a small DOM grouping in MemoryPanel.tsx). No Go/CLI, provider, config, memory, or skill code is touched.

Issues

N/A — these layout bugs were not tracked in a GitHub issue.

Verification

  • Browser-rendered regression check (real styles.css + mirrored DOM) at content-column widths ≈ 496/416/356/316px across four project-name variants (short, long, tiny "main"-like, 87-char path) for the memory page: workspace selector + Suggestions button always on the same row; tab pills shrink-wrap; name wraps without truncation.
  • cd desktop/frontend && pnpm build passes (eslint, CSS syntax check, tsc, Vite, bundle budgets).
  • wails build produces reasonix-desktop.exe; the settings window was manually checked at ~1400 / ~950 / ~800px widths.

Cache impact

Cache-impact: none — desktop frontend CSS/markup only; no provider-visible system prompt, memory prefix, output style, tool schema, or skill-index changes.

Cache-guard: N/A — no cache-sensitive surface touched.

System-prompt-review: N/A


摘要

本 PR 修复设置页在窄窗口(≤900px,子智能体页另含 760–930px 区间)下出现的三处布局问题:

  1. 「使用 / 接入 / 使用统计」子标签撑满整行。 @media (max-width: 900px) 中 .settings-subtabs 原先为 display: flex; width: 100% 并横向滚动;现改为 inline-flex; max-width: 100%; flex-wrap: wrap,按钮组收缩贴合内容,放不下时自然换行而非撑满或横向滚动。

  2. 记忆页:项目名称选择器与「候选建议」按钮被拆到两行。 原窄窗口堆叠布局中名称居左上、建议按钮居右下;改为普通可换行 flex 行后,短项目名还可能混进记忆标签那一行、建议按钮掉到单独一行。现标签行改为可换行的 flex 行:四个记忆标签(背景记忆/归档的记忆/指令文件/活动)独占一行并保持收缩贴合;项目名称选择器与「候选建议」按钮通过新增的 memory-tabs-row__tail 容器(flex-basis 100%)绑定为同一组,无论名称长短始终同行。名称优先单行,列宽不足时自然换行(overflow-wrap: anywhere,不截断、不加省略号/line-clamp)。

  3. 子智能体页:内置覆盖设置卡片右端超出设置列。 .subagents-builtin-overrides 原先为 repeat(2, minmax(200px, 1fr)),最小 568px 会在窗口 760–930px(内容列约 500–568px)时溢出被裁剪。现改为 minmax(0, 1fr)(保留 ≤760px 的单列兜底),卡片随列收缩而不再超出。

改动仅限 desktop/frontend(CSS + MemoryPanel.tsx 一处 DOM 分组),不涉及 Go/CLI、provider、配置、记忆或技能代码。

Issues

无 —— 这些布局问题未登记对应 GitHub issue。

验证

  • 浏览器渲染回归(真实 styles.css + 镜像 DOM),内容列约 496/416/356/316px,记忆页四种名称长度变体(短名/长名/"main" 级极短名/87 字符超长路径):项目名称与「候选建议」恒同行;标签药丸收缩贴合;名称换行不截断。
  • cd desktop/frontend && pnpm build 通过(eslint、CSS 语法检查、tsc、Vite、bundle budgets)。
  • wails build 产出 reasonix-desktop.exe,设置窗口按 ~1400 / ~950 / ~800px 三档手动核对。

Cache impact

Cache-impact: none —— 仅桌面端前端 CSS/标记;不涉 provider 可见的系统提示、记忆前缀、输出风格、工具 schema 或技能索引。

Cache-guard: N/A —— 未触及缓存敏感面。

System-prompt-review: N/A


效果展示

修复前

0a9bcca8a5e517347245aadea6fda5b4 9f88933f44b7f869cd252555facb32ed 3360b7e5092ba35bfa732903fbbd2b36

修复后

efff7a08c98b97bf64a65aebf92b5cb0 dc428d8cf464c4fae7d425d143fab740 8f84e1455b06c1035be83b4ad5c99335

HaoyueQin avatar Aug 03 '26 17:08 HaoyueQin