Skip to content

fix(workshop): 让主题投稿和 ZIP 入口可用 - #2054

Merged
ccch1mneyyy merged 2 commits into
mainfrom
fix/workshop-theme-publish
Nov 26, 2026
Merged

ccch1mneyyy merged 2 commits into
mainfrom
fix/workshop-theme-publish

Conversation

@ccch1mneyyy

@ccch1mneyyy ccch1mneyyy commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Why the change

主题工坊的「发现」页找不到投稿入口,投稿页会保留旧的本机来源列表,文件提示也漏写了主题 ZIP。

Special things to note

  • 复用既有 GitHub 登录、分享权利确认和归档上传流程;没有变更服务端、上传格式或已有投稿记录。
  • 主题文件仍先走既有校验与暂存,不改已安装主题。这里没有在真机上传作品,也没有构建安装包或采集截图。

Change outline

「发现 → 投稿」直接打开原投稿页;结果页的「回到我的投稿」会切到对应标签,普通返回仍留在「发现」。来源列表离开后释放,重进时读取本机主题;ZIP 行不依赖本机列表加载,系统文件选择器失败后会提示并允许重试。同步中英文说明及内置指南,并补回归用例:发现页导航、来源刷新、选档失败重试,以及本机主题和 ZIP 的两条打包路径。

Verification

检查 实际结果 环境与未覆盖范围
git diff --cached --check 通过 本地补丁
python3 app/tool/l10n_merge.py --check 通过 79 组、8977 个文案键
python3 app/tool/guide_sync.py --check 通过 38 份指南
dart format --output=none(改动的 Dart 文件) 可解析 仅静态,不是类型分析
Flutter 回归测试 / 真机上传 本机未运行 Flutter 回归由远端 CI 执行;未验证实际系统文件选择器和真实账号上传

Summary by CodeRabbit

  • New Features
    • The Workshop now includes community theme packs, with a Themes filter and entry points from theme settings.
    • Submit saved or imported themes, pets, or companions—or choose a ZIP file directly. Start submissions from Browse or My uploads.
    • Browse now provides a direct way to start a submission, including when viewing an empty filtered catalog.
  • Bug Fixes
    • The ZIP picker remains available while submission sources load and after a selection error, with clearer storage-related error feedback.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Workshop adds publishing from Browse, includes theme packs as publishing sources, and updates source-list and ZIP-picker behavior. Guides and localized strings describe the expanded Workshop content and submission options.

Changes: Workshop publishing

Layer / File(s) Summary
Publishing sources and ZIP selection
app/lib/state/workshop_publish_sources.dart, app/lib/ui/workshop/workshop_publish_form.dart, app/test/state/workshop_publish_sources_test.dart, app/test/support/workshop_access_samples.dart, app/test/ui/workshop/workshop_publish_test.dart
The source list remains visible during loading and when empty. ZIP selection reports picker errors and distinguishes errors that occur before a temporary copy exists. The provider is auto-disposed. Tests cover theme archives, refreshed sources, and picker behavior.
Browse publishing and return navigation
app/lib/ui/workshop/workshop_browse.dart, app/lib/ui/workshop/workshop_screen.dart, app/lib/ui/workshop/workshop_publish_page.dart, app/lib/ui/workshop/workshop_mine.dart, app/test/ui/workshop/workshop_browse_test.dart, app/test/ui/workshop/workshop_publish_test.dart
Browse provides a publish button and no longer shows a submission action in the empty catalogue. The publishing page returns a boolean result, which the screen uses to switch to Mine. Tests cover the Browse entry point and return behavior.
Theme-pack Workshop documentation
docs/guide/.../06-pets.md, app/assets/skills/dsh-go-guide/*-06-pets.md, app/lib/l10n/app_{en,zh}.arb, app/lib/l10n/parts/workshop*.arb
Guides and localized strings describe theme packs, the Themes filter, Workshop entry points, and expanded submission sources.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant WorkshopScreen
  participant WorkshopPublishPage
  participant WorkshopPublishSourceList
  WorkshopScreen->>WorkshopPublishPage: Opens from the Browse publish button
  WorkshopPublishPage->>WorkshopPublishSourceList: Displays sources and ZIP selection
  WorkshopPublishPage-->>WorkshopScreen: Returns true after result-screen back action
  WorkshopScreen->>WorkshopScreen: Selects Mine when the result is true
Loading

Possibly related PRs

  • ccch1mneyyy/dsh-Go#1082: Adds the Workshop discovery and submission flow that this PR extends with a Browse publishing entry point and theme-pack submission sources.
Merge Risk: Minimal · up to 03716 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(workshop): 让主题投稿和 ZIP 入口可用" (make theme submission and ZIP entry points usable in the workshop) matches the main changes. The changeset adds theme pack submission, lets users choose ZIP…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(workshop): 让主题投稿和 ZIP 入口可用" (make theme submission and ZIP entry points usable in the workshop) matches the main changes. The changeset adds theme pack submission, lets users choose ZIPs directly, makes the publish page reachable from Browse, and returns users to My Submissions after publishing. The title is in Chinese, which matches the PR objectives. It omits the navigation and source-refresh changes, but it names the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 44d4c535-65b8-4f17-af95-5f5de45fc8ed
Commits

Reviewing files that changed from the base of the PR and between 2255bda and 0371608.

Files selected for processing: 6

  • app/lib/ui/workshop/workshop_mine.dart
  • app/lib/ui/workshop/workshop_publish_page.dart
  • app/lib/ui/workshop/workshop_screen.dart
  • app/test/state/workshop_publish_sources_test.dart
  • app/test/ui/workshop/workshop_browse_test.dart
  • app/test/ui/workshop/workshop_publish_test.dart

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +124 to +126
onPressed: () => unawaited(
Navigator.of(context).push(MaterialPageRoute<void>(builder: (_) => const WorkshopPublishPage())),
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Wrong destination after Workshop submission

After submitting from Browse, “Back to My uploads” returns to Browse. The result button calls _leave, which pops WorkshopPublishPage without switching tabs.

Learn more

Before Browse could open the submission page directly, the My uploads launcher had already selected the destination tab. The result action still assumes that popping the submission page returns to that tab. The new launcher leaves Browse selected.

Example: Open Browse, submit a theme, and tap “Back to My uploads” on the confirmation screen. Browse reappears instead of the submission list.

Recommended fix: Return a distinct navigation result from the explicit My uploads action and have the Browse launcher select WorkshopTab.mine on that result. Preserve ordinary Back behavior. Add a widget test that starts from Browse and checks the selected tab after tapping the result action.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@ccch1mneyyy
ccch1mneyyy merged commit 5ebbfd7 into main Nov 26, 2026
14 checks passed
@ccch1mneyyy
ccch1mneyyy deleted the fix/workshop-theme-publish branch November 26, 2026 00:01
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