Skip to content

[skip eval] fix: 生图重试时失败卡片由新卡片接替,点阵卡片去掉文字 - #385

Merged
HyxiaoGe merged 2 commits into
masterfrom
fix/image-retry-replaces-failed-card
Oct 11, 2026
Merged

HyxiaoGe merged 2 commits into
masterfrom
fix/image-retry-replaces-failed-card

Conversation

@HyxiaoGe

@HyxiaoGe HyxiaoGe commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

问题

  1. dev 上画 iPhone 18 Pro 时,第一次调用 Gemini 没返回图片(no_image_returned),Agent 自动重试。界面上同时显示了两张卡片:上面一张「图片生成失败」,下面一张「正在生成图片」。
  2. 点阵卡片左上角的「正在生成图片」字很小,和点阵混在一起不容易看清,也没必要显示。

改动

  • collectPendingImageGenerations:同一轮里,一次生图失败或中断后,如果后面又发起了生图,就不再显示前面那张失败卡片,由后面的卡片接替。只有最后一次生图失败时,才显示失败卡片。
  • 生成中的卡片不再显示左上角的文字,只保留右下角的秒数。这段文字改为只对读屏软件可见(sr-only),状态播报不受影响。失败和中断时的居中提示不变。

只改了前端展示,不影响模型行为。

验证

  • GeneratedImages.test.tsx、AssistantResponseStack.test.tsx 共 28 个测试通过。新增测试覆盖失败后重试只剩一张卡片的情况,并断言文字只对读屏可见。eslint 无报错。
  • 合并后在 dev 上看生成中的卡片。重试的情况不好主动触发,先靠单测覆盖。

🤖 Generated with Claude Code

HyxiaoGe and others added 2 commits October 11, 2026 19:57
同一轮里生图失败后又发起了生图,只保留最新的那张卡片,不再同时显示失败卡片和生成中卡片。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
文字和点阵混在一起不易分辨,只保留右下角秒数;文字改为仅读屏可见,状态播报不变。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HyxiaoGe HyxiaoGe changed the title [skip eval] fix: 生图重试时失败卡片由新卡片接替 [skip eval] fix: 生图重试时失败卡片由新卡片接替,点阵卡片去掉文字 Oct 11, 2026
@HyxiaoGe
HyxiaoGe merged commit 4f412c0 into master Oct 11, 2026
5 checks passed
@HyxiaoGe
HyxiaoGe deleted the fix/image-retry-replaces-failed-card branch October 11, 2026 12:10
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