Skip to content

Whale peek size, keep pets on screen, and the more-pets announcement - #137

Merged
shaohaozhi286 merged 3 commits into
masterfrom
claude/whale-peek-size-and-edge
Oct 16, 2026
Merged

shaohaozhi286 merged 3 commits into
masterfrom
claude/whale-peek-size-and-edge

Conversation

@shaohaozhi286

Copy link
Copy Markdown
Collaborator

改了什么

  • 鲸鱼娘贴边偷看时头不再偏大:偷看原画比精灵帧大约 1.8 倍(眼睛高度、发箍到嘴的距离都量过),之前固定画成 170 像素高,头大了将近一倍。现在按常规帧缩放 ÷ 1.8 绘制,头和其它姿态一样大。
  • 宠物头顶的会话卡片不再被屏幕边截掉:吸附要求窗口伸出屏幕约 1/4 宽,只蹭到边上松手时窗口会停在半出屏的位置。现在松手没吸附就把整个窗口收回工作区(keep_desktop_pet_in_work_area,Windows / macOS 同一个纯函数,所有宠物都适用)。
  • 「新特性」首屏宣传:已经答复过虚拟办公室开启邀请的老用户,启动后在首屏弹一次。主标题「新特性」,副标题「增加更多宠物,丰富您快乐工作的每一天」,只展示大眼回形针、rover、鲸鱼娘的图和名字,不加说明。点一只就切成它(宠物没开就同时开启),「知道了」关闭。office.json 新增 pets_promo_seen,由 aceDesktop_claimPetsPromo 原子认领;新用户认领开启邀请时一并消耗,不会连弹两个窗。

验证

  • test-classic-desktop-pets.mjs 全过,新增偷看高度断言(80–100 像素)。
  • 桌宠布局单测 22 个、桌宠服务单测 11 个(新增 3 个),用 MSVC 单独编译通过;desktop_pet.cpp 语法检查编译通过。
  • 前端全量单测、test-virtual-office-preferences.mjs(含宣传弹窗:浅色 / 深色 / 窄屏、点选切换、只认领一次)、pnpm build、分层与所有权检查通过。
  • 在真实首屏上渲染过宣传弹窗。macOS 宿主未在本机编译,改法与 Windows 一致。

The edge-peek art is drawn about 1.8 times larger than the sprite frames
but was always painted 170 canvas pixels tall, so her head nearly doubled
when she docked. It now uses the frame scale divided by that ratio.

Releasing a pet over the screen edge without reaching the dock range
(about a quarter of the window past the edge) left the window half off
screen and cut off the session card above it. Releasing now pulls an
undocked window back inside the work area on Windows and macOS.
Users who already answered the virtual office invitation get a one-time
dialog: "增加更多宠物,丰富您快乐工作的每一天" with Clippy, Rover and Whale
Girl shown as picture and name only. Picking one switches to it and turns
desktop pets on; "知道了" closes it.

office.json gains pets_promo_seen, claimed atomically through
aceDesktop_claimPetsPromo. First-time users consume it together with the
invitation (or when they toggle pets before ever seeing it), so nobody gets
two dialogs. The dialog shares the invitation's blocking and guided-tour
rules.
@shaohaozhi286
shaohaozhi286 merged commit 7dff491 into master Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants