Skip to content

feat(frontend): complete UI redesign with systematic cleanup#10

Merged
sylvanding merged 6 commits intomainfrom
feat/frontend-redesign
Mar 18, 2026
Merged

feat(frontend): complete UI redesign with systematic cleanup#10
sylvanding merged 6 commits intomainfrom
feat/frontend-redesign

Conversation

@sylvanding
Copy link
Copy Markdown
Owner

@sylvanding sylvanding commented Mar 18, 2026

Summary

UI Redesign (Phase 1-6)

  • Design System First 完整前端重设计:React 18 + TailwindCSS v4 + shadcn/ui + 自定义设计系统
  • 所有页面重写:Playground, KnowledgeBases, Papers, Settings, Discovery, Tasks, Writing, PDFReader, ChatHistory

Sidebar

  • 简化为可展开 icon rail(无独立面板列)
  • 展开时显示聊天历史列表(搜索 + 新建聊天)
  • Playground 页面高亮当前对话
  • 项目页面自动收起
  • 图标大小在收缩/展开时保持一致

Systematic Cleanup

  • 3 个 P0 Bug 修复:去重 keep_existingkeep_old、Pipeline file_pathspdf_paths、ResolvedConflict 类型对齐
  • API 层统一:创建 api-config.ts,替换 7 处硬编码路径;补全 5 个缺失的 API service 方法
  • 代码清理:删除 4 个死文件,移除 3 个废弃依赖(减少 27 个包)
  • 类型安全:消除多处 as unknown as / as any 转换
  • 文件名溢出修复:AddPaperDialog 中过长文件名正确 truncate

Commits (5)

  1. feat(frontend): complete UI redesign with design system first approach
  2. refactor(frontend): systematic cleanup after redesign
  3. docs(config): update frontend rules and skill for redesigned architecture
  4. fix(frontend): simplify DualSidebar and fix text overflow
  5. feat(frontend): integrate chat history into sidebar expanded panel

Test plan

  • npx tsc --noEmit 零错误
  • npm run build 构建成功
  • 15 个 API 端点通过 curl 联调测试全部 200 OK
  • Playwright E2E: 26/26 通过
    • 侧边栏展开/收起 + 项目页自动收起
    • 聊天流程(加载、KB 选择器、新建聊天、欢迎界面)
    • 知识库管理(列表 + 创建对话框)
    • 项目子页面(Papers、Discovery、Writing)
    • Add Paper 对话框
    • 设置页、历史页、任务页
    • API 健康检查(3 个端点)
  • Pre-commit hooks 通过

Documentation

  • docs/solutions/integration-issues/2026-03-19-frontend-redesign-systematic-cleanup.md
  • docs/brainstorms/2026-03-19-sidebar-simplification-brainstorm.md

Implement comprehensive frontend redesign following Figma design specs:

- Design tokens: OKLCH purple/violet color scheme for light/dark modes
- Layout: DualSidebar (icon rail + expandable text panel) + TopBar + PageLayout
- Components: DataTable, Pagination, StatsCard, ProgressBar, StatsGrid
- Pages: Rewrite all 8 pages (KB, Papers, Settings, Discovery, Tasks, Writing, PDF, History)
- API layer: Align all services with backend (POST body for search, batch delete, pagination, typed query keys)
- Replace A2UI SDK with custom components, react-force-graph with D3.js submodules
- Bundle size: -127KB (gzip -41KB) from dependency removals

Made-with: Cursor
Fix sidebar duplication by integrating ChatHistorySidebar into DualSidebar,
fix 3 API type mismatches (dedup keep_existing→keep_old, pipeline file_paths→
pdf_paths, ResolvedConflict shape), centralize API URLs via api-config.ts,
remove dead code and unused deps, add missing service methods, improve type
safety.

Made-with: Cursor
…ture

Reflect new design system (purple/blue primary, OKLCH tokens), component
conventions (PageLayout, DataTable, DualSidebar), API URL centralization
(apiUrl/wsUrl), and CSS transitions preference over framer-motion.

Made-with: Cursor
Rewrite DualSidebar as expandable icon rail (no separate panel column),
auto-collapse on project routes, add toggle button above language icon.
Fix filename overflow in AddPaperDialog with min-w-0 on list items.
Update Playwright tests for port 3001 and new UI selectors — 26/26 pass.

Made-with: Cursor
Show conversation list in DualSidebar when expanded, with search and
new chat button. Highlight current conversation on playground routes.
Unify NavItem component for consistent icon sizing across states.
Widen sidebar to w-56 for better title readability. Fix Playwright
test selector to avoid matching sidebar "New Chat" button.

Made-with: Cursor
Fix relative link paths in d3-citation-graph solution doc (docs/plans
→ ../plans). Update WritingPage test to use getAllByRole('tab') instead
of getAllByRole('button') since shadcn Tabs renders with role="tab".

Made-with: Cursor
@sylvanding sylvanding merged commit 741400a into main Mar 18, 2026
4 checks passed
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