fix(home): narrow account button without shrinking its contents
This commit is contained in:
1 parent
a9fa221d7a
commit
430233f825
4 files changed
+17
-7
No files matched your search
@@ -25,7 +25,11 @@
|
||||
- Verification: focused account/module/wallet units, typecheck/lint/build, existing Electron account/layout scenarios plus visual geometry assertions at four widths and screenshots. Compare before/after live title and trigger rectangles in Renderer-only update, with complete Main/resource/package byte proof and current-pointer binding. Fresh saved-state guards remain; do not save/discard for the user or perform real account/payment/Agent operations.
|
||||
- Source implemented and frozen: three product files only (ModuleSelection, globals, HomeAccountMenu), README and focused geometry assertions. Existing handlers, menus/dialog lifecycle, module permissions, Code alignment/card stack and Main are unchanged.
|
||||
- Verification complete before activation: 25 focused units / 3 files, typecheck, scoped source/test ESLint and full build passed. Two Electron scenarios passed, with title displacement, actual text-range width, half-size surface/avatar, unchanged click footprint, full-size menu/gap, 16px bottom inset, desktop left shift/mobile screen safety and prior navigation/menu/wallet behavior. Layout measured at 1440/1024/768/375; desktop and mobile account screenshots plus 1024/375 layout screenshots visually inspected. Independent Main proof: dist-electron 8 files/resources 57 files/package exact original 7c snapshot.
|
||||
- Renderer-only update prepared next, current-pointer baseline remains active 383ce71; source commit and final live receipt to be recorded after clean-state activation.
|
||||
- Initial implementation a9fa221d7a8c9142b04ea20940b4a880fdca7697 was deployed successfully from 383ce71, with independent regular snapshot home-position-20261013-c42d19a7; Main/session/home route/focus retained. Live title shift 56.69291687px and Code/card geometry unchanged. Account visual was 128x25 with 16px bottom inset; immutable receipts preserve that intermediate result.
|
||||
- User immediately clarified the account requirement: only width becomes half, while avatar, text and button height stay the original size. This clarification supersedes the initial full-surface-scale interpretation. Keep title/left/bottom positions, restore 50px visual height, 32px avatar, 14px text and 16px arrow, use 128px width with compact horizontal gaps/padding, and keep the full menu 8px above the visible trigger. Do not scale the surface. Latest implementation changes only HomeAccountMenu, README and corresponding test/doc measurements; Main and other product code stay as verified.
|
||||
- Width-only correction verified: 25 focused units / 3 files, typecheck, scoped component/test lint and complete build passed. Layout Electron scenario passed at four widths; account scenario passed with 128x50 surface, 32px avatar, 14px font, 16px arrow, full-size menu and 8px gap, existing wallet/profile/settings/logout fixture behavior and unchanged 16px bottom/safe-left inset. Desktop/mobile account screenshots visually inspected; no user account operation in these fixtures.
|
||||
- Initial new arrow check sampled the inherited rotation transition at 16.345px; now waits for the final 16px rectangle without relaxing the assertion or changing product animation. One isolated retry did not mount the fake account; a subsequent unchanged run passed. No authentication implementation changed; retain this fixture-startup observation for a separate investigation if it repeats. Real-app login/trigger will be independently verified during deployment.
|
||||
- Root independently rechecked complete Main/resources/package byte equality after corrected build. Final correction is ready for Renderer-only activation against active a9fa221; source and receipt recorded next. No additional approval needed; user explicitly requested the correction.
|
||||
|
||||
|
||||
## Homepage Vertical Layout Follow-up · 2026-10-13
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Code 会话保存的模型被下架后,会提示重新选择可用模型;用户可在原会话中切换,恢复时使用新选择并保留会话与历史消息。切换不会自动重发消息或自动选择替代模型。
|
||||
|
||||
Makelore 是一个面向软件、视觉创作、智能机器人与个人云智能体的 AI 桌面工作台。当前版本为 `2.0.0`,首页展示 Agents、Code、Canvas 三个模块入口,Robot 入口隐藏;云智能体需配套配置 WS/Yuxi 服务。桌面采用左侧问候与标题、右侧三个横向插画卡片竖排的布局,Code 入口中心与“今天,想创作什么?”标题中心对齐,三个入口等高、间距均匀;标题组在桌面向右偏移约 1.5cm,小窗口将标题放在卡片上方;Agents 标语为“打造你想象中的AI助手”。首页左下角保留半尺寸的账户入口,向左偏移约 1.5cm(小窗口保留边距)并靠近底部;展开菜单保持原尺寸,可查看本人词元点数与预占、打开词元点数与充值、个人资料、设置和退出登录;沿用侧栏的账号、钱包和资料规则。工作区左上角入口点击后返回模块入口页:
|
||||
Makelore 是一个面向软件、视觉创作、智能机器人与个人云智能体的 AI 桌面工作台。当前版本为 `2.0.0`,首页展示 Agents、Code、Canvas 三个模块入口,Robot 入口隐藏;云智能体需配套配置 WS/Yuxi 服务。桌面采用左侧问候与标题、右侧三个横向插画卡片竖排的布局,Code 入口中心与“今天,想创作什么?”标题中心对齐,三个入口等高、间距均匀;标题组在桌面向右偏移约 1.5cm,小窗口将标题放在卡片上方;Agents 标语为“打造你想象中的AI助手”。首页左下角保留半宽的账户入口,头像、文字与按钮高度保持原尺寸,向左偏移约 1.5cm(小窗口保留边距)并靠近底部;展开菜单保持原尺寸,可查看本人词元点数与预占、打开词元点数与充值、个人资料、设置和退出登录;沿用侧栏的账号、钱包和资料规则。工作区左上角入口点击后返回模块入口页:
|
||||
|
||||
- `Makelore Code|AI 编程`:管理本地项目、项目智能体、对话、文件上下文、代码变更和运行时。
|
||||
会话工作台采用浅蓝项目栏、彩色通用手柄图标与卡片选中态;中间对话/作品使用圆角标签,作品预览的后退、前进、刷新与网址输入统一放在标签右侧;只在作品页显示,窄窗口自动换行。右侧智能体咨询使用奶油色标题区。沿用真实项目和会话入口、侧栏伸缩与账户菜单,样式只作用于 Code 会话工作台。可编辑的空对话在输入区上方的可用区域中央显示童趣欢迎语;「去作品广场逛逛」入口紧贴输入框上方,两者一起位于底部。老师介绍以固定宽度浮在右上角,不占用中间布局;欢迎语和底部输入区始终相对项目栏右侧的整个内容区域居中;小窗口的欢迎内容独立滚动;发送首条消息后收起欢迎区。侧栏保留「作品广场」入口,只有点击后才在系统浏览器打开公共广场,不请求、摘取或内嵌展示广场作品。打开广场保留当前项目、对话、草稿和附件,不自动发送消息;老师求助按钮保留临时应用的最新文案「帮我整体看🧠」。
|
||||
|
||||
@@ -59,7 +59,7 @@ export function HomeAccountMenu({ accountName, avatarUrl, onOpenProfile }: {
|
||||
}
|
||||
}}>
|
||||
<span data-testid="home-account-trigger-surface"
|
||||
className="pointer-events-none absolute bottom-0 left-0 flex min-h-12 w-64 origin-bottom-left scale-50 items-center gap-3 rounded-2xl border border-border/80 bg-background px-4 py-2 text-sm font-medium shadow-sm group-hover:bg-surface-subtle">
|
||||
className="pointer-events-none absolute bottom-0 left-0 flex min-h-12 w-32 items-center gap-2 rounded-2xl border border-border/80 bg-background px-2 py-2 text-sm font-medium shadow-sm group-hover:bg-surface-subtle">
|
||||
<UserAvatar src={avatarUrl} initial={initial} className="h-8 w-8 shrink-0" />
|
||||
<span className="min-w-0 flex-1 truncate">{accountName}</span>
|
||||
<ChevronUp aria-hidden="true" className={`h-4 w-4 shrink-0 transition-transform ${open ? 'rotate-180' : ''}`} />
|
||||
@@ -67,7 +67,7 @@ export function HomeAccountMenu({ accountName, avatarUrl, onOpenProfile }: {
|
||||
</button>
|
||||
<DisclosureContent ref={menu} id="home-account-menu" open={open} role="menu" aria-label="账户菜单"
|
||||
data-testid="home-account-menu"
|
||||
className="glass-surface absolute bottom-[2.0625rem] left-0 z-50 w-72 max-w-[calc(100vw-2rem)] rounded-2xl border border-border/80 p-3 text-foreground shadow-float"
|
||||
className="glass-surface absolute bottom-[calc(100%+0.5rem)] left-0 z-50 w-72 max-w-[calc(100vw-2rem)] rounded-2xl border border-border/80 p-3 text-foreground shadow-float"
|
||||
innerClassName="max-h-[calc(100dvh-8rem)] overflow-y-auto"
|
||||
onKeyDown={event => {
|
||||
if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;
|
||||
|
||||
@@ -106,11 +106,17 @@ test.describe('Makelore module navigation without setup flow', () => {
|
||||
const visible = (await surface.boundingBox())!;
|
||||
const target = (await trigger.boundingBox())!;
|
||||
const avatar = (await surface.locator('span').first().boundingBox())!;
|
||||
// Opening the menu rotates the arrow; compare its final visual size.
|
||||
await expect.poll(async () => (await surface.locator('svg').boundingBox())!.width).toBeCloseTo(16, 1);
|
||||
const chevron = (await surface.locator('svg').boundingBox())!;
|
||||
const panel = (await menu.boundingBox())!;
|
||||
expect(visible.width).toBeCloseTo(128, 1);
|
||||
expect(visible.height).toBeCloseTo(25, 1);
|
||||
expect(avatar.width).toBeCloseTo(16, 1);
|
||||
expect(avatar.height).toBeCloseTo(16, 1);
|
||||
expect(visible.height).toBeCloseTo(50, 1);
|
||||
expect(avatar.width).toBeCloseTo(32, 1);
|
||||
expect(avatar.height).toBeCloseTo(32, 1);
|
||||
await expect(surface).toHaveCSS('font-size', '14px');
|
||||
expect(chevron.width).toBeCloseTo(16, 1);
|
||||
expect(chevron.height).toBeCloseTo(16, 1);
|
||||
expect(target.width).toBeCloseTo(128, 1);
|
||||
expect(target.height).toBeCloseTo(50, 1);
|
||||
expect(visible.x).toBeGreaterThanOrEqual(16);
|
||||
|
||||
Reference in new issue
Block a user