fix(web): squad modal 重复 project_dir input 导致保存失效#104
Merged
Conversation
added 2 commits
June 20, 2026 23:10
- server: new PATCH endpoint, body { title }, 80-char cap, 404/400 handled
- store.set_thread_title already existed (v0.10); now wired to HTTP
- web: dblclick #detail-title prompts for new name, refreshes list
- tests: store-level rename + length cap, server PATCH happy/404/missing-field
agent route is by thread_id, so renames are safe — only display changes.
squad-form 里有两个 name="project_dir" 的 input:一个是带 6-state 校验 的新版(project-dir-input),一个是 legacy label。提交时 els.form.elements.project_dir 解析成 RadioNodeList、.value 不是用户输入 的那个;reopen 时也只 populate 第一个。表现:改了 project dir 点保存, 再打开还是旧值。 删 legacy label,保留新版。
🤖 bot-review (comment-only · phase 1)Diff: Red-line checks:
Phase 2: auto-approve + auto-merge fire only when red-lines are clean, author is internal, and no needs-human path is touched. Block with |
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.
Bug
Scott 反馈:squad 编辑里改 project directory 点保存,再打开还是旧值。
Root Cause
web/index.htmlsquad-form 里有两个name="project_dir"的 input:#project-dir-input(带 6-state 校验、validate API、状态 icon)#squad-project-dirlabel(PR feat(web): save 按钮改成 icon-only,与 ☆/✎ 风格统一 #100/PR-A 重构前的残留)后果:
els.form.elements.project_dir解析成RadioNodeList,.value不是用户实际编辑的那个 inputFix
删 legacy label,保留新版(6-state 校验那个)。
Verify
grep -n 'name="project_dir"' web/index.html现在只剩 1 行#squad-project-dir只在 style.css helper 选择器里被引用,不会破坏后端 / 单测Test
后端测试 (
test_squad_project_dir_round_trip等) 不依赖前端 id,无影响。cc @scott