Skip to content

fix(guid): add dismiss button to skills market banner#1848

Merged
piorpua merged 2 commits intoiOfficeAI:mainfrom
amanharshx:fix/1847-skills-market-banner-dismiss
Mar 30, 2026
Merged

fix(guid): add dismiss button to skills market banner#1848
piorpua merged 2 commits intoiOfficeAI:mainfrom
amanharshx:fix/1847-skills-market-banner-dismiss

Conversation

@amanharshx
Copy link
Copy Markdown
Contributor

@amanharshx amanharshx commented Mar 28, 2026

Closes #1847

Summary

  • Add a circular dismiss button to the Skills Market banner on the welcome page
  • Hide the banner for the current welcome-page visit only
  • Keep the banner visible again when the user opens a new chat / returns to the welcome page

Motivation

The banner is shown prominently on the welcome / new chat page and can feel distracting because there was no way to temporarily hide it.

Diff

+16 −3 across 1 file

Files changed

  • SkillsMarketBanner.tsx — add dismiss control and page-local dismissed state

Testing

  • bunx tsc --noEmit — no type errors
  • bun run lint — passes with existing repo-wide warnings only, no errors

Risks / Side effects

  • Minimal — localized UI/state change in one banner component
  • Dismissal is intentionally page-local only; the banner appears again when the user opens a new chat / returns to the welcome page

@sentry
Copy link
Copy Markdown

sentry bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...derer/pages/guid/components/SkillsMarketBanner.tsx 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 29, 2026

CI 检查未通过

以下 job 在本次自动化 review 时未通过,请修复:

Job 结论
Unit Tests (windows-2022) ❌ CANCELLED
Build Test (macos-arm64) ❌ CANCELLED
Build Test (macos-x64) ❌ CANCELLED
Build Test (windows-x64) ❌ CANCELLED
Build Test (windows-arm64) ❌ CANCELLED
Build Test (linux) ❌ CANCELLED

本次自动化 review 暂缓,待 CI 全部通过后将重新处理。

@piorpua piorpua added bot:reviewing Review in progress (mutex) bot:ci-waiting CI failed and author notified — snoozed until new commits are pushed and removed bot:reviewing Review in progress (mutex) labels Mar 29, 2026
@piorpua piorpua added bot:reviewing Review in progress (mutex) and removed bot:ci-waiting CI failed and author notified — snoozed until new commits are pushed labels Mar 30, 2026
@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 30, 2026

Code Review:fix(guid): add dismiss button to skills market banner (#1848)

变更概述

本 PR 在欢迎页的 Skills Market 横幅右上角新增了一个圆形关闭按钮,通过页面级 dismissed 本地状态控制横幅显隐。关闭后仅对当次访问生效,用户打开新会话或返回欢迎页时横幅恢复显示。改动仅涉及 SkillsMarketBanner.tsx 一个文件(+16/-3)。


方案评估

结论:✅ 方案合理

页面级关闭(组件 unmount 即重置)与 PR 描述的需求完全一致,无需持久化也无需 IPC 通信。方案与现有代码风格一致,使用 Arco Button + @icon-park/react 图标符合项目 UI 规范,没有过度工程化。布局调整(Switch 和关闭按钮共用一个 flex-col 容器)简洁合理。


问题清单

🔵 LOW — 新增代码缺乏测试覆盖

文件src/renderer/pages/guid/components/SkillsMarketBanner.tsx,第 23、78、102 行

问题说明:Codecov 报告本次 patch 覆盖率为 0%(3 行新增代码均未被测试覆盖)。dismissed 状态是核心行为(按下关闭后不再渲染),属于新增逻辑,建议补充测试以防后续回归。codecov/patchinformational,不阻塞合并,仅供参考。

建议补充的测试用例

it('初始渲染时横幅可见', () => {
  // 验证 initialized=true 且 dismissed=false 时组件正常渲染
})

it('点击关闭按钮后横幅消失', async () => {
  // 点击 aria-label="Close" 的按钮后,组件不再渲染
})

汇总

# 严重级别 文件 问题
1 🔵 LOW SkillsMarketBanner.tsx:23,78,102 新增代码缺乏测试覆盖

结论

批准合并 — 无阻塞性问题,代码逻辑正确,i18n 完整,lint 通过,只有一个 LOW 级测试覆盖建议。


本报告由本地 pr-review skill 生成,包含完整项目上下文,无截断限制。

CONCLUSION: APPROVED
IS_CRITICAL_PATH: false
PR_NUMBER: 1848

@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 30, 2026

✅ 已自动 review,无阻塞性问题,正在触发自动合并。

@piorpua piorpua merged commit 54e7727 into iOfficeAI:main Mar 30, 2026
13 of 14 checks passed
@piorpua piorpua added bot:done Auto-merged by bot and removed bot:reviewing Review in progress (mutex) labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:done Auto-merged by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Skills Market banner cannot be dismissed on the welcome page

2 participants