Skip to content

fix(portal): 「我的软件包」改用权威归属 + 显示审核中的提交 - #20

Merged
eggfly merged 1 commit into
mainfrom
fix/mine-authoritative-ownership
Jul 28, 2026
Merged

fix(portal): 「我的软件包」改用权威归属 + 显示审核中的提交#20
eggfly merged 1 commit into
mainfrom
fix/mine-authoritative-ownership

Conversation

@eggfly

@eggfly eggfly commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

问题

#/mine 只靠解析 deb Maintainer 的 noreply 邮箱判断归属:

  1. Maintainer 是真实邮箱的包(fxcam 等),上传者永远看不到自己的包;
  2. 刚上传的包在 PR 合并 + 索引重建完成前完全无踪影,像 bug;
  3. 页面内索引缓存永不过期,索引更新后不刷新页面也看不到。

改动

  • 归属改用 packages Pages 构建发布的 owners.json(聚合 release manifest 的 uploaded_by,见 feat(index): 发布 owners.json 权威包归属(修复门户「我的软件包」) packages#86),老包保留 noreply 兜底
  • 新增 GET /api/my-submissions:列出本人最近的 publish PR(门户 PR 按标题匹配,czdev PR 按作者匹配),「我的软件包」把不在索引里的提交显示为「审核中」/「已合并,索引更新中…」
  • 索引/归属缓存 30 秒过期 + ?t= cache-buster,提交成功后立即失效
  • Worker 的 submit/unpublish 预检查与上传预检也改用 owners.json
  • 「归属」列显示 @login(无记录时退回邮箱),i18n 三语已更新

Made with Cursor

"My packages" derived ownership solely by parsing the deb Maintainer field
for a GitHub noreply address, so every package published with a real email
(fxcam, calendar, ...) was invisible to its uploader; fresh submissions were
also invisible until merge + index rebuild, and the in-page index cache never
expired, so even then a reload was required.

- resolve ownership from the published owners.json (aggregated from the
  release manifests' authoritative uploaded_by; generated by the packages
  repo Pages build), keeping the noreply fallback for legacy packages
- new GET /api/my-submissions: recent publish PRs of the caller (portal PRs
  matched by title, czdev PRs by author) so just-uploaded packages show up
  immediately as "under review" / "merged, index rebuilding"
- index/owners caches now expire after 30s, are cache-busted with ?t=, and
  are dropped after a successful submit
- worker submit/unpublish pre-checks and the upload preview also use
  owners.json instead of guessing from Maintainer
- the Owner column shows @login when known (falls back to the email)

Co-authored-by: Cursor <cursoragent@cursor.com>
@eggfly
eggfly merged commit fd216d8 into main Jul 28, 2026
1 check passed
@eggfly
eggfly deleted the fix/mine-authoritative-ownership branch July 28, 2026 08:43
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