Skip to content

Release v3.2: 封面槽位与元数据过渡不再位移,新增下载/解密曲目数 - #11

Merged
LYJW131 merged 6 commits into
mainfrom
dev
Jul 30, 2026
Merged

LYJW131 merged 6 commits into
mainfrom
dev

Conversation

@LYJW131

@LYJW131 LYJW131 commented Jul 30, 2026

Copy link
Copy Markdown
Member

两个位移修复加一项既有的在途功能。

fix(detail) — 元数据到达时不再插值布局。 这是所有者报告的「封面先缩小又放大」。逐帧测量:过渡期间封面出现 13 种不同几何,下边缘 1187 → 1145 → 1187 设备像素,其下所有内容滑过 24 个位置、约 56pt。

原因既不是封面也不是图片加载,而是 .animation(.easeInOut(duration: 0.5), value: palette) 覆盖了整个内容子树,而 palette 与标题、曲目数、列表在同一次状态更新里解析 —— SwiftUI 看到的是一个视图高度从 A 变到 B,于是连几何一起插值。

给该内容一个按「元数据是否已到达」区分的身份并配透明度过渡,布局便瞬间落位、两个版本原地交叉淡变。修复后实测:封面每一帧同一个几何,其下区块只有两个位置 —— 旧的在原地淡出,新的在最终位置淡入。

没有改动任何布局值。 没有增删或修改任何 frame、padding、间距、高度、行数限制或对齐;两个身份渲染的是同一个视图、同一组参数。渐变是刻意保留的。

fix(artwork) — 封面槽位的尺寸不再取决于内容。 槽位原本是一个没有任何成员声明尺寸的 ZStack:占位建立在 GeometryReader 上,图片在解出 UIImage 之前画 Color.clear,两者都完全柔性。列表行躲过一劫仅仅因为它的调用点固定了 56pt。现在占位是声明尺寸的 Rectangle,封面移入 .overlay。

feat(detail) — 显示正在下载/解密的曲目数。 既有在途改动,随本次发布。单看速率无法区分「一首在快速传输」和「多首各自很慢」。

Debug 与 Release 均构建通过,单元测试全部通过。

🤖 Generated with Claude Code

LYJW131 added 4 commits July 30, 2026 10:51
The slot was a ZStack in which nothing claimed space: the placeholder is
built on a GeometryReader and the image renders Color.clear until a
UIImage is decoded, and both are fully flexible. The list row escaped only
because its caller happens to pin a 56pt frame; the detail hero, which has
an aspectRatio and no frame, got its size negotiated from whatever the
content currently was.

The placeholder is now a Rectangle that sizes the slot and the cover moved
into an .overlay, which is sized by its parent and never contributes to
it. Color.clear, a thumbnail, a 1620px cover and nothing at all now all
produce the identical slot.

Ordering is unchanged — placeholder underneath, image on top, Color.clear
until the bytes are actually decoded, so the slot still never flashes
white — and the 0.25s fade and its reduceMotion guard are untouched.

Signed-off-by: LYJW131 <lyjw2007@gmail.com>
The owner reported the cover shrinking and then growing on a job detail
page. Measured from a screen recording: the artwork took 13 distinct
geometries during the transition, its bottom edge moving 1187 → 1145 →
1187 device px, and everything under it slid through 24 positions —
56pt of continuous travel over about 0.4s.

The cause was not the artwork and not the image load. `.animation(
.easeInOut(duration: 0.5), value: palette)` covers the whole content
subtree, and the palette resolves in the *same* state update that brings
the title, the track count and the item list. SwiftUI saw one view whose
height went from A to B and interpolated it, geometry included.

Giving that content an identity keyed on whether metadata has arrived,
with an opacity transition, makes the layout settle instantly while the
two versions cross-fade in place. Measured after: one geometry for the
artwork in every frame, and the block below it holds exactly two
positions — the old one fading out where it was, the new one fading in
where it belongs.

**No layout value changed.** No frame, padding, spacing, height, line
limit or alignment was added, removed or altered; the two identities
render the same view with the same arguments. The cross-fade is
deliberately kept — it was an explicit request — and `.animation(...,
value: palette)` is untouched.

Side effect worth knowing: the identity change rebuilds the subtree once
at resolution, so scroll returns to top. The waiting page has nothing to
scroll, and a job that is already resolved when opened gets no transition
at all.

Signed-off-by: LYJW131 <lyjw2007@gmail.com>
TaskSpeedTracker 现在除速率外还统计处于下载中与解密中的曲目数,摘要页
把它们显示在对应的速率旁边——单看速率无法区分「一首在快速传输」和
「多首各自很慢」,而这两种情况的处理方式完全不同。

这部分是既有的在途改动,本次随修复一并发布。

Signed-off-by: LYJW131 <lyjw2007@gmail.com>
Signed-off-by: LYJW131 <lyjw2007@gmail.com>
@claude

claude Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

LYJW131 added 2 commits July 30, 2026 10:57
`Config/Portal.xcconfig` was wired in as the project-level base
configuration and then added to .gitignore, so a clean checkout had a
dangling reference. I assumed at the time that Xcode would warn and carry
on. It does not — xcodebuild reports

    error: Unable to open base configuration reference file

and fails outright. That is why CI has been red on every run since the
compile-time host injection landed, and why the failure looked like a
review-bot problem rather than a build one.

The base file is now committed and deliberately empty, with an optional
`#include? "Portal.local.xcconfig"` for the real host. A fresh clone
resolves the reference and builds; a developer keeps their own host in the
gitignored local file; and the release workflow keeps passing
AMDL_PORTAL_HOST on the xcodebuild command line, which overrides both.

An empty host was already a supported state — BackendEndpoint returns ""
and the app asks the user for an address — so a clone that has neither
override still produces a working build rather than one silently pointed
at nothing.

Verified by building a checkout with Portal.local.xcconfig absent, which
is exactly what CI sees.

Signed-off-by: LYJW131 <lyjw2007@gmail.com>
`everyCallSiteReadsTheOneSetting` and `bearerGoesOnlyToThePortalHost` both
read the ambient `baseURLString`, which comes from AMDL_PORTAL_HOST and is
injected at compile time. A developer's checkout has a host, so they pass;
a fresh clone and CI do not, so `apnsURLString(from: "")` returns "" and
fails `hasSuffix("/apns")`, and `URLComponents(string: "")?.host` is nil
and fails a `#require`.

They now check the derivation against an explicit host and keep the
ambient assertions behind a guard, so they describe the logic in every
environment and the configured case where there is one to describe. This
is the same correction `legacyGatewayURLMigration` already needed for the
same reason; these two were missed.

Verified by running the suite against a checkout with no local override,
which is exactly what CI sees.

Signed-off-by: LYJW131 <lyjw2007@gmail.com>
@LYJW131
LYJW131 merged commit 0894d87 into main Jul 30, 2026
2 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.

1 participant