Skip to content

v0.2.5

Choose a tag to compare

@github-actions github-actions released this 09 Sep 06:07
· 20 commits to Master since this release

v0.2.5

新增

  • 通知横幅:被 @、被回复、收到私聊时,若 AtomChat 面板处于打开状态(或 4 秒内打开),面板顶部会弹出横幅(发送者头像 + 类型 + 名字 + 内容预览)。点击横幅跳转到那条消息并短暂高亮;最多同时显示 3 条,4 秒后淡出。面板关闭时不绘制 HUD,仅播放音效并累积 @N 未读角标。
  • 通知音效:上述三类事件播放同一个内置气泡提示音;面板关闭时同样生效(2 秒去重,避免刷屏时连续响)。
  • 通知设置:设置 → 聊天 →「通知」分组,含提及横幅、提及音效、私聊横幅、私聊音效四个开关、通知音量滑条与「测试音效」卡片。

修复

  • 部分会话头像完全无法同步:头像请求 3 秒无人应答——恰恰是对方刚加入、内置服务器最忙的时候——客户端就把整个会话判死为「服务器无伴侣」,之后再也不同步;房主侧最容易中招(对方一出现,会话卡立刻发起首个请求)。另外会话内首次头像上传在没有收到过任何应答前会被静默丢弃。现在超时只进入 5 秒冷却重试、不再判死;只有真实的通道协商结果才能标记无伴侣;协商允许后上传立即放行;并为每一步加了 debug 开关控制的 [avatar] 日志。
  • 发送者名字显示为纯白:尖括号行的发送者标签是合成的纯文本,丢掉了行内自带的颜色——其他玩家的名字一律按"界面文字颜色"渲染。已改为按运行段切片保留原样式;当发送者完全不带颜色时,再用记分板队伍颜色兜底(debug 模式下会打 [sender] 日志)。
  • 面板背景颜色不可改:开启模糊时面板叠加色是硬编码(0xFF16191F),改配置里的背景色完全无效。现在模糊/非模糊两条路径都用配置的背景色,并在 外观设置 里新增「背景颜色」调色行。
  • 装饰名在公屏气泡里泄漏尖括号:服务器把整个装饰名包进尖括号时(如 FTB Teams 称号 <[称号]E33EPUS> 453),移植自 e33chat 的解析器只会剥掉名字前的 <,别人看到的发送者成了 <[称号]E33EPUS 且带着服务器的下划线/点击样式。已补回 e33chat cleanNameArea 的整块剥离分支:字符串标签与富文本切片都会去掉外层 <>,并保留内层称号颜色。
  • 自己的气泡显示裸名:本地回显只用真实资料名,看不到自己的称号/队伍前缀。移植了 e33chat 的 ownDisplayName():标签列表名 → 聊天回显中缓存到的装饰名 → 队伍前缀/颜色/后缀 → 裸名,公屏与私聊的自 bubbles 均生效;加入/断开时清空缓存。
  • 会话内换头像对方看不到:头像缓存以会话为生命周期,上传成功后没有任何通知——已缓存旧图的(或刚拿到"无头像"负缓存的)客户端要等重进世界才能刷新。现在上传成功后服务器会向所有客户端广播 avatar_changed,各端丢弃该 uuid 的缓存并在下一帧重新拉取;通道为可选注册,旧客户端自动忽略。
  • 通知设置分组无法折叠:0.2.5 新增的「通知」分组漏了折叠白名单登记,和其它分组不同,它一直保持展开无法收起。
  • 0.2.4 的通知横幅会把整个界面推出屏幕(回退项重做):横幅绘制时 saveLayer 缺少配对的 restore,每帧泄漏一层画布变换;叠加逐帧的密度缩放后变换指数级放大,面板向右下飞出屏幕并表现为"无法再打开面板/按键无响应"。已改为两段 restore,并移除 HUD 绘制路径——横幅只在面板画布内绘制。

更改

  • 通知音效换为原创合成音:横幅提示音替换为本仓库原创合成的气泡音(正弦滑频 + 噪声瞬态),不再使用来源受限的素材,发版无版权负担。
  • 聊天记录自动清理默认 7 天historyRetentionDays 默认值从 0(永久)改为 7;「保留聊天记录」开关本身仍默认关闭,开启后过期记录按周清理,不再无限增长。
  • Skia 画布护栏:每帧绘制结束后强制回退到进入时的画布栈基线。今后任何地方再漏 restore,后果最多影响一帧,不可能再累积成界面飞出。
  • 会话列表只保留在线玩家:离线私聊卡不再常驻列表,避免每次重建都做皮肤解析和排序;离线期间该会话不在列表里(无法从列表打开),对方重新上线时卡片自动恢复,磁盘里的私聊记录不受影响。
  • 别人资料页不再显示会话时长:本地会话计时只对自己有意义,不再把它显示在对方资料下。
  • 标题与标签使用真实粗体:新增 bundled-bold.otf(Noto Sans CJK SC Bold),不再用描边伪粗体。

Added

  • Notification banners: when you are @mentioned, quoted or sent a private message while the AtomChat panel is open (or within the next 4 seconds), a banner drops in at the top of the panel (sender avatar + type + name + content preview). Clicking it jumps to that message and highlights it briefly; up to three stack at once and each fades out after 4 seconds. With the panel closed no HUD is drawn — only the sound plays and the @N unread badge accumulates.
  • Notification sounds: the three events above share one bundled pop cue; it also fires while the panel is closed (2s de-duplication keeps spam quiet).
  • Notification settings: Settings → Chat → Notifications, with four switches (mention banner/sound, whisper banner/sound), a notification volume slider, and a Test sound card.

Fixed

  • Custom avatars failed to sync in some sessions: if an avatar request went unanswered for 3 seconds — exactly what happens when the other player joins and the integrated server is busiest — the client latched "server has no companion" for the whole session and never synced again. The host side was the most exposed, since conversation cards fire the first request the moment the other player appears. On top of that, the first avatar upload of a session was silently dropped unless a response had already come back. Timeouts now simply retry after a 5s cooldown instead of latching; only the real channel negotiation can mark the server companion-less; uploads pass as soon as negotiation allows; and a debug-gated [avatar] log line was added for each step.
  • Sender names rendered pure white: the angle-bracket slice branch synthesised a plain literal label, dropping the line's own run colours — every other player's name displayed in the fallback interface text colour. The branch now slices around the brackets run-wise (styles kept), and when a sender carries no colour at all the scoreboard team colour is applied as a fallback (debug builds log a [sender] line).
  • Panel background colour could not be changed: with blur enabled the panel tint was hardcoded (0xFF16191F), so panelBgColor had no effect at all. Both the blurred and unblurred paths now tint with the configured background colour, and a "Panel background color" row was added to the appearance settings.
  • Decorated names leaked the angle brackets on public bubbles: when the server wraps the whole decorated name in angle brackets (FTB Teams titles, <[称号]E33EPUS> 453), the e33chat-derived parser only stripped the < before the name, so other players saw <[称号]E33EPUS with the server's underline/click styling still attached. The cleanNameArea whole-wrap branch that was dropped in the port is restored: both the string label and the rich-text slice drop the wrapping pair while keeping the inner title colours.
  • Own bubbles showed a bare name: the local echo only used the real profile name, so your own title/team prefix never showed. Ported e33chat's ownDisplayName(): tab-list name → decorated name cached from own chat echoes → team prefix/colour/suffix → bare name, applied to both public and private own bubbles; the cache clears on join/disconnect.
  • Avatar changes never reached the other side mid-session: the avatar cache lives for one session and uploads triggered no notification, so a client that had already cached the old image (or negative-cached "no avatar") kept it until the next join. A successful upload now broadcasts avatar_changed to all clients, which drop that uuid's cache and re-request on the next frame; the channel is optional, so older clients simply ignore it.
  • The notification settings group could not be folded: the 0.2.5 "Notifications" group was missing from the foldable-group whitelist, so unlike every other settings group it stayed permanently expanded.
  • 0.2.4 banners flung the whole UI off screen (the rolled-back feature, rebuilt): drawBanner pushed a saveLayer without a matching restore, leaking one canvas transform per frame; combined with the per-frame density scale the transform compounded exponentially until the panel flew off screen, which also surfaced as "cannot reopen the panel" and unresponsive keys. Fixed with paired restores, and the HUD draw path is gone — banners render on the panel canvas only.

Changed

  • Notification cue replaced with an original synthesized pop: the banner sound is now a synthesized bubble pop (sine glide + noise transient) original to this repository, replacing an asset of restricted provenance — releases carry no copyright baggage.
  • Chat history auto-clean defaults to 7 days: historyRetentionDays changed from 0 (forever) to 7. The "Keep chat history" switch itself stays off by default; when enabled, expired history is pruned weekly instead of growing unbounded.
  • Skia canvas guard rail: every frame now rewinds to the canvas stack baseline it entered with. A future unbalanced save/restore can corrupt at most one frame instead of compounding into a runaway transform.
  • Online-only conversation cards: offline private-chat cards no longer stay in the list (no per-rebuild skin resolve/sort for players you cannot message); while they are offline the conversation cannot be opened from the list, the card returns when they join, and the on-disk history is untouched.
  • Other players' profiles no longer show the session timer: the local session timer is only meaningful for yourself, so it is hidden on other profiles.
  • Real bold headings and labels: added bundled-bold.otf (Noto Sans CJK SC Bold) instead of stroke-smeared faux bold.