Skip to content

fix(web): squad modal 重复 project_dir input 导致保存失效#104

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/squad-modal-duplicate-project-dir
Jun 25, 2026
Merged

fix(web): squad modal 重复 project_dir input 导致保存失效#104
github-actions[bot] merged 2 commits into
mainfrom
fix/squad-modal-duplicate-project-dir

Conversation

@SymbolStar

Copy link
Copy Markdown
Owner

Bug

Scott 反馈:squad 编辑里改 project directory 点保存,再打开还是旧值

Root Cause

web/index.html squad-form 里有两个 name="project_dir" 的 input:

  1. 新版 #project-dir-input(带 6-state 校验、validate API、状态 icon)
  2. legacy #squad-project-dir label(PR feat(web): save 按钮改成 icon-only,与 ☆/✎ 风格统一 #100/PR-A 重构前的残留)

后果:

  • 提交时 els.form.elements.project_dir 解析成 RadioNodeList.value 不是用户实际编辑的那个 input
  • reopen 时 app.js:2132 也只 set 第一个,第二个永远是空/旧值
  • 视觉上 modal 里出现两次 "Project directory" 字段(见 thread 截图)

Fix

删 legacy label,保留新版(6-state 校验那个)。

Verify

  • grep -n 'name="project_dir"' web/index.html 现在只剩 1 行
  • legacy id #squad-project-dir 只在 style.css helper 选择器里被引用,不会破坏后端 / 单测

Test

后端测试 (test_squad_project_dir_round_trip 等) 不依赖前端 id,无影响。

cc @scott

judy 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,保留新版。
@github-actions

Copy link
Copy Markdown

🤖 bot-review (comment-only · phase 1)

Diff: 1 file changed, 4 deletions(-) @ b1655cf

Red-line checks:

  • ✅ A-7.5: no new 'forbidden' code in xiaof

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 no-auto-merge label or [no-auto-merge] in title.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved by bot-review: red-line checks clean, internal author, no needs-human paths.

@github-actions github-actions Bot enabled auto-merge (squash) June 25, 2026 04:17
@github-actions github-actions Bot merged commit 463176c into main Jun 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant