feat: add first-run onboarding flow#2
Conversation
Add a guided first-run setup so users can configure a local knowledge repository and API settings before entering the reader. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the empty home page with a repository overview that summarizes files, folders, content types, and suggested reading entry points. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
感谢 PR!先说结论:首次启动体验差这个问题确实需要解决,方向是对的。下面是我建议在合并前调整的几点。 建议拆 PR这个 PR 实际包含两件独立的事:onboarding 流程 + 用 Knowledge Map 替换空首页。建议拆开,让 onboarding 先合,Knowledge Map 单独 PR 单独评估必要性(它和首次启动体验不是同一个问题)。 Onboarding 实现需要优化的 4 点这几个不是代码风格问题,是会破坏现有用户配置的实质问题: 1. "api_key": api_key or auth_token, # 会丢失 auth_token 语义现状 2. 不应清空已有的多 repo 配置
3. "needs_onboarding": not is_onboarding_complete() or not valid_repos,用户完成 onboarding 后,如果某天把 repo 目录挪了路径( 4. Commit message CLAUDE.md 里写了 commit 不带 其他小建议(不 blocking)
期待下个版本,加油! |
bencode#1: 创建 packages/ui/src/lib/platform.ts - 统一平台检测: isTauri/isPWA/isMobile/isDesktop/isWeb - API 基础 URL 管理 (Web 相对路径 vs Tauri localhost) - Tauri 原生功能桥接: 文件夹选择、服务器启停、窗口控制 - 平台能力探测: supportsFS/supportsTray/supportsNotifications 等 - 零依赖: Tauri SDK 按需动态 import,Web 模式完全隔离 bencode#2: 完善 Tauri 桌面端构建配置 - 更新 package.json 添加构建脚本和依赖 - 创建 desktop/src/main.tsx 桌面入口点 - 重构 tauri.ts 为 platform.ts 的 re-export - 添加 vite.config.ts (复用 UI 代码) - 添加 tsconfig.json (路径别名 @ -> ui/src) - 更新 tauri.conf.json (构建命令、CSP、图标) - 生成占位图标文件 - 更新 build.sh 构建脚本
Add a guided first-run setup so users can configure a local knowledge repository and API settings before entering the reader.