Widget: validate data-history-ttl-days values
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 64/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
Start with the script-tag parser that reads data-history-ttl-days, then inspect its related tests and the widget configuration docs. Choose and document a safely supported non-negative range, including 0, and verify that values outside it fall back to the 30-day default. Tests should cover a normal value, 0, an oversized value, and one that would overflow when converted to milliseconds.
由索引模型根据 Issue 内容生成。
描述
Problem
The script-tag parser converts any digit-only data-history-ttl-days value to a number. An extremely large value can overflow when converted to milliseconds, making conversation expiry unreliable.
Expected behavior
- Accept non-negative integer values within a documented, safely supported range.
- Ignore values outside that range so the widget uses its 30-day default.
- Keep
0valid for callers who want saved conversations to expire immediately.
Tests
Cover a normal value, 0, an oversized value, and a value that would overflow when converted to milliseconds.
Update the widget configuration docs with the accepted range and fallback behavior.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 7
- 平均合并
- 3 小时 10 分钟
- 30 天内合并 PR
- 339
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/chatcops 的其他 Issue
-
documentation
难度 3/5 1-2 天 新手友好度 72/100
codercops/chatcops#555 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 25/100
codercops/chatcops#546 · 4 条评论 ·
维护者通常 1 天内回复
-
Server: validate `rateLimit.windowMs` before creating the limiter可能已有人在做 @ashutoshpalhare 于 2 天前认领。 未关闭
codercops/chatcops#452 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Widget: a "New reply" button when the visitor has scrolled up可能已有人在做 @srujankaleru2007 于 3 天前认领。 未关闭enhancement widget
codercops/chatcops#420 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
chatcops test: --url to test a deployed server可能已有人在做 @srujankaleru2007 于 3 天前认领。 未关闭enhancement testing
codercops/chatcops#419 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
enhancement tech debt
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
privatenumber/tsx#866 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
danielmiessler/LifeOS#2533 ·
维护者通常 9 天内回复
-
auto:producer auto:uiux
难度 2/5 1-3 小时 新手友好度 78/100
fritzprix/libr-agent#2447 ·
维护者通常 1 天内回复