Skip to content

feat(web): restyle console with shadcn-admin layout - #14

Merged
Akaliup merged 1 commit into
masterfrom
feat/rag-hybrid-retrieval
Nov 6, 2026
Merged

Akaliup merged 1 commit into
masterfrom
feat/rag-hybrid-retrieval

Conversation

@Akaliup

@Akaliup Akaliup commented Nov 6, 2026

Copy link
Copy Markdown
Owner

变更摘要

前端按 satnaing/shadcn-admin 的布局与视觉风格重构:Tailwind CSS v4 + shadcn 设计令牌、可折叠固定侧边栏、粘性顶栏、Card / Badge / Table 等基础组件、浅色与深色主题。保留既有 API 契约、USD 整数美分格式化、服务端角色校验与全部测试依赖的可访问名称。

同时修复两处 e2e 暴露的问题:

  • 桌面宽度缩到移动端时,侧边栏 padding 过渡导致瞬时横向溢出(改为仅在 md: 及以上启用过渡)。
  • 建议列表刷新前,审批页可能回退到另一条建议并对其执行批准/拒绝;现在仅在未指定 selectedId 时才回退到首条。

关联任务

无

实际验证

  • python -m pytest backend/tests -q — 未验证(本次仅前端改动,未执行)
  • npm --prefix frontend test
  • npm --prefix frontend run build
  • npm --prefix frontend run test:e2e(Playwright,7 个用例)
  • python scripts/mcp_check.py — 未验证(本次仅前端改动,未执行)
  • python scripts/smoke.py — 未验证(本次仅前端改动,未执行)
  • docker compose config --quiet — 未验证(未涉及 Compose)
  • 真实 LLM 调用 — 未执行(自动 CI 不执行)
  • 未执行项已在上文明确标注

验证结果:

npm --prefix frontend test
 Test Files  1 passed (1)
      Tests  17 passed (17)

npm --prefix frontend run build
 ✓ 2266 modules transformed.
 ✓ built in 4.53s

npm --prefix frontend run test:e2e
 7 passed (23.0s)

docs/screenshots/ 已由 e2e 重新生成(overview / approval / execution / mobile / agent-trace / agent-trace-mobile)。

安全与边界

  • 未提交 .env、API Key、数据库、缓存、构建产物或本机运行数据
  • 所有执行仍为 simulation,没有真实广告、采购、支付或外部系统副作用
  • 金额仍以 USD 整数美分存储和传输
  • 服务端仍决定角色,未信任客户端角色请求头
  • 审批与执行仍依赖条件更新、事务和唯一约束
  • 未在自动 CI 中调用真实 LLM

契约与文档

  • 无契约变更(API、数据库、状态机未改动)
  • 无评测变更(docs/EVALUATION.md 未涉及)
  • 未验证项已在上文标注

审查提示

请重点检查金额守恒、证据 ID 可追溯性、LLM 失败/降级可见性、审批执行幂等和敏感信息。自动审查工具的评论只是辅助,不替代人工审查。

🤖 Generated with Claude Code

Rebuild the frontend on Tailwind v4 and shadcn tokens: fixed collapsible
sidebar, sticky blurred header, card/badge/table primitives, and light/dark
themes.

Preserve API contracts, integer-cent money formatting, server-side roles and
all test-facing labels. Keep wide tables inside their own scroll areas, and
keep approval actions bound to the opened recommendation while the list
refreshes.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T21:17:40.385353Z 47a98c9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Akaliup
Akaliup merged commit 59d545b into master Nov 6, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47a98c972e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +31 to +33
'fixed inset-y-0 left-0 z-50 flex w-64 flex-col border-r bg-sidebar text-sidebar-foreground transition-[width,transform] duration-200 ease-in-out md:z-30 md:translate-x-0',
mobileOpen ? 'translate-x-0' : '-translate-x-full',
collapsed ? 'md:w-14' : 'md:w-64',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the closed mobile sidebar from keyboard navigation

Below the md breakpoint, closing the sidebar only translates it offscreen; its six navigation buttons remain focusable and exposed to assistive technology. Consequently, tabbing from the start of the page, or continuing after selecting a navigation item closes the drawer, moves focus through invisible controls rather than the visible workspace. Hide or make the closed mobile sidebar inert, while preserving desktop navigation, and restore focus to the menu trigger when closing it.

Useful? React with 👍 / 👎.

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