Repository navigation
release: v0.9.2 #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # PikPak DL CLI v0.9.2 | ||
|
|
||
| 发布日期:2026-10-25 | ||
|
|
||
| 提取码缺失或错误时,分享不再一直显示“扫描中”,可以在界面里直接补填提取码;也能识别只有链接和一行提取码的分享文本。 | ||
|
|
||
| ## 改进 | ||
|
|
||
| - **在界面中补填提取码**:分享因提取码缺失或错误而停下时,选中该分享按 Enter 打开提取码输入框,提交后立即重新扫描。按键提示中的 Enter 会相应显示为“提取码”。提取码只能是 1 到 32 位字母或数字,格式不对时在输入框内说明。 | ||
| - **识别单独一行的提取码**:整段文本只有一行链接和一行提取码(中间可以有空行)时,即使没有“提取码:”之类的标注,也能识别。其他没有标注的文字仍不当成提取码。 | ||
|
|
||
| ## 修复 | ||
|
|
||
| - **扫描失败不再显示为“扫描中”**:提取码被拒绝、分享已失效或扫描多次失败时,分享行以红色显示原因,不再显示“扫描中”和动态图标。提取码问题分为“分享需要提取码”和“提取码错误”两种,分别显示。 | ||
|
|
||
| ## 下载 | ||
|
|
||
| | 平台 | 文件 | | ||
| | --- | --- | | ||
| | macOS Apple 芯片 | `pikpak-dl-cli-darwin-arm64` | | ||
| | macOS Intel | `pikpak-dl-cli-darwin-x64` | | ||
| | Windows x64 | `pikpak-dl-cli-windows-x64.exe` | | ||
| | Windows arm64 | `pikpak-dl-cli-windows-arm64.exe` | | ||
| | Linux x64(glibc) | `pikpak-dl-cli-linux-x64` | | ||
| | Linux arm64(glibc) | `pikpak-dl-cli-linux-arm64` | | ||
|
|
||
| `SHA256SUMS.txt` 列出各文件的校验和。 | ||
|
|
||
| ## 升级说明 | ||
|
|
||
| 直接替换可执行文件即可。任务库结构不变,不需要迁移或重新登录。 | ||
|
|
||
| 升级前已经因提取码停下的分享仍显示“分享需要提取码,或提取码不正确”,同样可以按 Enter 补填提取码。 | ||
|
|
||
| ## 已知问题与待验收 | ||
|
|
||
| - 提取码输入框尚未在真实终端中手动演练,目前只经过自动化界面测试。 | ||
| - 之后单独复制的提取码仍不会自动配对到等待中的分享,需要按 Enter 输入,或重新复制包含链接和提取码的完整文本。 | ||
| - v0.9.1 与 v0.8.1 列出的待验收项仍然有效。 |
16 changes: 16 additions & 0 deletions
16
openspec/changes/archive/2026-10-25-fix-share-pass-code-waiting/design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ## Context | ||
|
|
||
| 分享扫描在 `scanShare` 中调用 `/drive/v1/share`;服务端返回 `PASS_CODE_EMPTY` 或 `PASS_CODE_ERROR` 时抛出 `ShareScanError("access_required")`,`finishScan` 把分享的 `scan_status` 记为 `failed`、`last_error` 记为 `access_required`。界面的分享行只区分“已完成扫描”与“其他”,`failed` 也被当成扫描中。 | ||
|
|
||
| ## Goals / Non-Goals | ||
|
|
||
| **Goals:** 等待提取码的分享一眼可见,并能在界面中就地补填;识别“链接 + 单独一行提取码”的简单写法。 | ||
|
|
||
| **Non-Goals:** 不放宽多分享或带说明文字时的配对规则;不把之后单独复制的提取码自动关联到任务(`clipboard-intake` 原有要求保持不变)。 | ||
|
|
||
| ## Decisions | ||
|
|
||
| 1. **单独一行的提取码只在最简单的形状下识别。** 整段文本去掉空白行后恰好两行:一行只有一个受支持的分享链接,另一行只有 4–32 位字母数字。其他形状(有说明文字、多个链接、带文件名的模板)仍按原规则处理,避免把文件名当成提取码。即使误判,服务端会拒绝,分享进入“提取码错误”,用户可以按 Enter 改正。 | ||
| 2. **缺码与错码分开记录。** `ShareScanError` 保留 `access_required` 作为类别(文件转存路径仍按它判断),另带 `reason`:`pass_code_missing` 或 `pass_code_wrong`。`finishScan` 与 `scan_waiting` 事件使用 `reason`;访问资料不可读时仍为 `access_required`。 | ||
| 3. **扫描失败的分享显示错误状态。** `scan_status` 为 `pending` 或 `active` 才算扫描中;`failed` 时用错误色显示原因,没有文件时替代“扫描中”,有文件时附在计数后。 | ||
| 4. **补填提取码是显式指定目标的输入。** 选中原因为 `pass_code_missing`、`pass_code_wrong` 或 `access_required` 的分享按 Enter 时打开输入框(其他分享仍是展开/折叠)。提交时由 `RuntimeSession` 的新命令 `setPassCode` 交给 `IntakeReceiver.receivePassCode`,复用 `acceptShare`:写入新的访问资料、重置因提取码失败的文件并请求重新扫描。这是用户对选中分享的明确操作,不违反“不自动关联单独复制的提取码”。提取码不写入事件、日志或快照。 |
28 changes: 28 additions & 0 deletions
28
openspec/changes/archive/2026-10-25-fix-share-pass-code-waiting/proposal.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| ## Why | ||
|
|
||
| 复制 `链接 + 空行 + 单独一行的提取码`(不带“密码:”之类的标注)时,解析器认不出提取码,分享按无码接收。服务端返回需要提取码后,分享的扫描记为失败,界面却仍显示“扫描中…”,只有事件区写着“扫描等待:分享需要提取码,或提取码不正确”。用户看不出任务已经停下,只能重新复制完整文本,没有就地补填提取码的办法。 | ||
|
|
||
| ## What Changes | ||
|
|
||
| - 解析:整段文本只有一个分享链接(独占一行)和一行单独的提取码时,把这一行识别为该链接的提取码。 | ||
| - 扫描结果区分“缺少提取码”(服务端 `PASS_CODE_EMPTY`)与“提取码错误”(`PASS_CODE_ERROR`),分别记录原因。 | ||
| - 主面板:扫描失败的分享不再显示“扫描中”,改用错误色显示失败原因;等待提取码的分享显示“按 Enter 输入提取码”。 | ||
| - 选中等待提取码的分享按 Enter,打开提取码输入框;提交后更新该分享的访问资料并重新扫描。 | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### New Capabilities | ||
|
|
||
| (无) | ||
|
|
||
| ### Modified Capabilities | ||
|
|
||
| - `clipboard-intake`:完整分享文本解析支持“单独一行的提取码”;缺失或错误提取码可以在界面中为指定分享补填。 | ||
| - `terminal-ui`:扫描失败的分享显示错误状态;新增提取码输入框。 | ||
|
|
||
| ## Impact | ||
|
|
||
| - `src/intake/parse.ts`、`src/intake/receiver.ts` | ||
| - `src/pikpak/shares.ts`(区分缺码与错码)、`src/runtime/engine.ts`、`src/runtime/session.ts`(新命令 `setPassCode`) | ||
| - `src/tui/app.tsx`、`main-panel.tsx`、`pages.tsx`、`view-model.ts` 与三种语言的界面文字 | ||
| - 测试:`tests/share-text.test.ts`、`tests/shares.test.ts`、界面与会话测试 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION: Document the constraints of the unlabeled two-line form: the code must be 4–32 letters/digits and the link line must contain only the link
loneCode(src/intake/parse.ts:81) only pairs the second line when it is 4–32 alphanumeric characters (NFKC-normalized) and the first line matches/^https?:\/\/\S+$/(URL only). A 1–3 character code, or a link line with extra text, is silently not recognized (tests/share-text.test.ts:62-63) and the share is accepted without a code. This sentence — and its parallels in docs/en/clipboard.md, docs/ja/clipboard.md, and docs/releaseNotes/v0.9.2.md — states no limits, while openspec/specs/clipboard-intake/spec.md explicitly requires “一行仅含 4 到 32 位字母数字的行”. The release notes' nearby “提取码只能是 1 到 32 位” (about the input box) invites readers to assume the same range applies to the copied two-line shape. Mentioning the minimum length would avoid that confusion.