Repository navigation
Fix #21: store feedback comment text and make it readable - #32
Open
xiaoyao-666-coder wants to merge 2 commits into
Open
xiaoyao-666-coder wants to merge 2 commits into
xiaoyao-666-coder wants to merge 2 commits into
Conversation
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.
问题
反馈 comment 文本被丢弃/存了无处可查:
POST /api/feedback接受 comment(max_length=500),但内存版只存了 hash、Redis 也只存了 hash,没有任何接口能把 comment 文本读回来。点踩写了文字也等于没写。修复
GET /api/feedback/comments:与 POST 同样的鉴权、按会话归属过滤(只能读自己会话的 comment),不经过匿名的/api/metrics。session_id/message_id/seq字段。commented(顺带修了 round-2 的 F7)。commented计数是“曾经带过 comment 的消息数”,撤销 rating 不删 comment。验证
MEDGUIDE_MODE=test python -m pytest -q backend/tests531 passed(基线 521 + 10 新)。覆盖:提交后读回、改文字算 change、同文字不算 change、改票保留 comment、空白不存不计、超 500 字符 422、未登录 401、只能读自己会话的 comment、端到端 chat→反馈→读回、Redis 原子性 round-trip。已知遗留
Closes #21