✨ feat: add Daily Brief module to homepage#13627
Conversation
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
|
👋 @arvinxx - Could you review this PR? It adds a Daily Brief module to the homepage with new React components ( |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## LOBE-6597-with-ui #13627 +/- ##
====================================================
Coverage ? 83.99%
====================================================
Files ? 534
Lines ? 36258
Branches ? 5982
====================================================
Hits ? 30456
Misses ? 5678
Partials ? 124
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 280d3f59fd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Add a Daily Brief section below the chat input on the homepage that
displays unresolved briefs from the Agent Tasks system. Users can
resolve, comment, and provide feedback directly from the brief cards.
- Service: BriefService with listUnresolved, resolve, markRead, addComment
- Store: Independent Zustand store (src/store/brief/) with SWR data fetching
- Components: BriefCard, BriefCardActions (dynamic action buttons),
BriefCardSummary (Markdown with expand/collapse), CommentInput (@lobehub/editor)
- Three action types: resolve (closes brief), comment (resolve with text),
link (safe URL navigation with protocol validation)
- Fixed feedback button: adds task comment without resolving the brief
- Inline success state ("Feedback sent") with 1.5s auto-restore
- i18n: zh-CN + en-US translations
- Tests: 21 tests across service, store selectors, and components
- CLI: Register task and brief commands for local development
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Display stacked agent avatars next to brief card titles using the new `agents` data from Arvin's enriched listUnresolved API (#13489). - Add AgentAvatarInfo type and agents field to BriefItem - Render overlapping circular avatars (20px, -6px overlap) - Use cssVar.colorBgContainer for border (dark mode compatible) - Extract avatar style to function to avoid inline object creation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract duplicate success state JSX into reusable SuccessTag component - Remove redundant comments that describe what code does - Use DEFAULT_AVATAR from @lobechat/const instead of hardcoded emoji Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use cssVar.colorBgBase instead of hardcoded #fff for primary button text color (dark mode contrast fix) - Add submitting state to CommentInput to prevent duplicate submissions (disable buttons + show loading during async submit) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run pnpm i18n to generate translations for all 18 locales. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b097789 to
e9b6087
Compare
Export BriefType union from packages/types and use it in BRIEF_TYPE_COLOR and BRIEF_TYPE_ICON records for compile-time key validation. Adding a new brief type now requires updating the shared type, and TypeScript will flag missing mappings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| <MaskShadow | ||
| size={32} | ||
| style={{ | ||
| maxHeight: expanded ? undefined : COLLAPSED_MAX_HEIGHT, |
…13627) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Changes
New:
src/features/DailyBrief/@lobehub/editor) for feedback inputNew:
src/store/brief/useClientDataSWRWithSync)useFetchBriefs,resolveBrief,markBriefRead,addCommentNew:
src/services/brief.tslambdaClientfor brief and task comment APIsModified
src/routes/(main)/home/features/index.tsx— Insert DailyBrief below InputAreasrc/locales/default/home.ts+locales/zh-CN/+locales/en-US/— i18n keysKey Design Decisions
BriefAction[]with three interaction types —resolve(closes brief),comment(resolve with text),link(safe URL navigation)task.addComment(adds comment without resolving the brief)agentsdata fromlistUnresolvedAPI (🔨 chore: add agent avatar data to brief list API #13489)noopener,noreferrerTest Plan
bun run type-check)Closes LOBE-5481
🤖 Generated with Claude Code