Repository navigation
前端:历史页新增来源标签、渠道/状态筛选和失败详情展示 - #159
Merged
todosdev[bot] merged 2 commits intoOct 28, 2026
Merged
Conversation
added 2 commits
October 28, 2026 14:34
Filter history by channel and success through URL search params backed by the notification-history query params. Show trigger_source badges in the table, mobile cards and detail panel, and render full channel errors in the detail view. Checkpoint: LSedHhJJ_GPziIAYlRyC0
Let the detail title wrap instead of truncating so long titles stay readable; table rows and mobile cards keep their single-line ellipsis. Checkpoint: 23Cz-MLPLqIP-XHg69NCE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
error全文;桌面表格与移动端卡片两种布局均已适配。web/,worker、接口契约与依赖均未变动。Changes
web/src/pages/history/HistoryPage.tsxuseSearchParams(channel、success),setSearchParams(..., { replace: true })同步 URL,不跳转、不堆历史;?channel=all、非法success值按「无筛选」处理。channel/success且limit=200不变;保留前端按标题/时间分组;递增请求序号丢弃过期响应,切换筛选时旧列表淡化而非闪骨架,成功后清空错误态。item/api/test → 事项/API/测试,null/其他不渲染;表格行、移动卡片、详情面板各一处。<pre>+pre-wrap/break-words全文展示;标题改为折行全文,不截断。w-full min-w-0,修复长错误文本造成的横向溢出。web/src/components/ui/select.tsx(新增):基于已安装@radix-ui/react-select的 shadcn/Nova 风格封装(Select/SelectTrigger/SelectValue/SelectContent/SelectItem),未新增依赖。web/src/lib/channels.ts:新增getChannelLabel(id),未知/已下线渠道回落原始 id。web/src/locales/zh.json、en.json:新增 13 个history.*键(来源 3 个、筛选 5 个、失败原因、清除筛选、筛选空态 2 个)。Testing
pnpm --filter web typecheck→ 退出码 0;pnpm lint(仓库根 biome)→ 0,仅既有的worker/src/routes/items.tsunused-import warning;pnpm format:check→ 0;pnpm build:web→ 成功。/history?channel=telegram且请求带&channel=telegram;「仅失败」后 URL/请求带success=false,仅剩失败记录;刷新带参 URL 筛选保留、下拉仍有全部 7 个渠道。trigger_source=null)不显示;详情面板 387 字符多行错误全文折行、无截断;筛选空态 + 清除筛选回到/history。body.scrollWidth = 320、卡片宽 288。clientWidth = scrollWidth,无省略号。.wrangler临时库(验证后已删除),未触碰生产环境。