fix(profile-helper): fix session persistence, block enforcement, anon recovery + docs#4
Open
Boyuan-Zheng wants to merge 4 commits intomainfrom
Open
fix(profile-helper): fix session persistence, block enforcement, anon recovery + docs#4Boyuan-Zheng wants to merge 4 commits intomainfrom
Boyuan-Zheng wants to merge 4 commits intomainfrom
Conversation
… config Migrate profile helper module: new blocks (ActionsBlock, ChartBlock, ChoiceBlock, RatingBlock, TextInputBlock, CopyableBlock, BlockRenderer), profile components (ScientistCard, ScientistMatchSection, ScientistScatter, profile sections), types.ts Update ChatWindow, ProfilePanel, ProfilePage, ScaleTestPage, scales data, scoring utils, and profile-helper.css Add vite proxy rule for /api/auth routing to localhost:8001 (auth service) Add DEPLOY_ARCH.md and full docs suite: product overview, product design, implementation plan, execution plan, profile page migration plan Made-with: Cursor
… anon profile recovery
Frontend changes:
- types.ts: add _responded_blocks (string[]) field to ChatMessage for block-level response tracking
- ChatWindow.tsx: handleBlockRespond now accepts blockId param; marks individual blocks as responded instead of entire message; BlockRenderer disabled/responded logic updated to block-level
- profileHelperApi.ts: add getChatHistory() function for GET /chat-history/{session_id}
Backend submodule update (fecf7f0):
- sessions.py: message history disk persistence (save_messages/load_messages)
- sessions.py: anonymous profile recovery by session id prefix
- sessions.py: _migrate_anon_to_user for login-time profile migration
- block_agent.py: single interactive block per turn enforcement
- block_agent.py: check_profile_completeness tool (F1-F7 validation)
- block_agent.py: max_iterations configurable via env var (default 30)
- profile_helper.py: GET /chat-history/{session_id} endpoint
- prompts.py: reinforce one-question-per-turn with code-level notice
- collect-basic-info/SKILL.md: 1 rating per round; incremental write_profile per batch
Docs (new):
- docs/画像构建系统_完整流程分析_v1.md
- docs/画像系统_沙盘推演_逻辑漏洞分析_v1.md
- docs/画像系统_技术修改方案与新架构_v1.md
- docs/画像系统_修改日志_v1.md
Made-with: Cursor
… for CI visibility Commit fecf7f0 exists on Boyuan-Zheng/Resonnet:boyuan but not yet on TashanGKD/Resonnet. When maintainer merges backend changes to TashanGKD/Resonnet, revert this to TashanGKD/Resonnet.git Made-with: Cursor
deploy.yml: - Replace broad 'location /' snippet with scoped 'location ^~ /VITE_BASE_PATH/' so tashan.chat's nginx only intercepts /topic-lab/ traffic, not the whole site - Read VITE_BASE_PATH from .env (default /topic-lab/) to keep it config-driven - Add redirect: GET /topic-lab -> 302 /topic-lab/ - Drop separate /api/ snippet (internal container nginx handles all API routing) - Rename snippet file to topiclab-main.conf frontend/nginx.conf: - Fix double-api path bug: /topic-lab/api/api/v1/ -> /topic-lab/api/v1/ frontend/nginx.conf.template: - Fix double-api path bug: __BASE_PATH__api/api/v1/ -> __BASE_PATH__api/v1/ - Add missing /topics and /topics/ API routes (align with nginx.conf) Made-with: Cursor
68ecd39 to
b6969c3
Compare
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.
画像构建系统漏洞修复(8项)
基于代码沙盘推演发现并修复了画像系统的全部关键漏洞,配套完整技术文档。
修复的问题
P0 数据丢失(最高优先级)
L1+L2:AI 超过1小时后失忆,断点续接失效
L5+L6:评分题出现多个,只有第一个答案被记录
P1 重要修复
L3:匿名用户 session 过期后画像数据丢失
L4:collect-basic-info 全量写盘,中途断线答案全丢
L7:一次一问无全局代码约束
L8:block_agent max_iterations 硬编码20,复杂流程截断
P2 优化与新功能
L13:匿名用户登录后画像数据丢失
新增:对话历史查询接口
新增:画像完整度后端工具
修改文件清单
后端(backend submodule,commit fecf7f0)
前端
文档(新增4份)
验证
全部修改已通过 Python linter 检查和功能验证(messages 持久化链路、completeness check、block_agent 导入、前端 TypeScript 类型检查)。
向后完全兼容,无破坏性 API 变更。