Skip to content

右侧预览里正在编辑时按 Esc:整个预览被关掉,应该只取消编辑 #36472

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #35590(记录页专题)。⛔ 不是认领。优先级 p2(协调席定的,维护者未指定:没有改动时只是多点一次;有改动时可能丢输入,协调席没试)。

维护者说过的(2026-11-22)

  • 「现在更新最新的代码,验收开发成果」
  • 协调席汇报验收发现的缺陷后,维护者:「bug立卡」。

现状(主干 6a35635a33(cloud e9da58ce77),本机托管环境,浏览器实测,账号是系统管理员,1440 宽)

  • 自建应用「CRM客户管理」的客户列表,把一条记录在侧边打开(右侧预览)。
  • 在「客户备注」的值上点一下进入编辑(整个字段区变成输入框,底部出现「取消」「保存」)。
  • 什么都不改,按 Esc:整个预览关掉了,回到列表。
  • 同一条记录在整页里做同样的事:按 Esc 只退出编辑,页面还在。
  • 改了内容以后再按 Esc 会怎样(是否有提示、输入是否丢失),协调席没有试。

要做的

  1. 预览里处于编辑状态时,Esc 先退出编辑,预览留着;不在编辑状态时 Esc 才关闭预览。
  2. 编辑里已经改了内容时按 Esc:和整页里的做法保持一致(整页里怎么处理未保存的改动,预览里就怎么处理),不能不提示就把输入丢掉并关掉预览。

不做的

  • 不改「点一下进入编辑」本身的做法。

验收

  • 预览里点一个字段进入编辑,不改内容按 Esc:回到查看状态,预览还开着;再按一次 Esc:预览关闭。
  • 预览里改了一个字段的内容按 Esc:行为和整页里相同,PR 正文写明是哪种(直接放弃 / 先确认)。
  • HotCRM「线索」的预览同样试一次。
  • PR 正文附一段说明或截图。

协调席自己加的

  • 「要做的」第 2 条(有改动时的处理):协调席没有实测现状,只要求和整页一致。

Activity

  1. added
    bug
    priority:p2
    domain:ui
    on Nov 22, 2026
  2. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

    通知记录 · 2026-11-22T13:09Z

    维护者 2026-11-22:「bug立卡」;此前:「后续 ux 专题立卡之后都通知 7号座位。」本卡按此通知席位 repo:objectstack#7,随后在它的信箱 #36199 里发一条。

  3. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Bug · a child the coordinator filed under #35590, measured in the browser → p2 as set by the coordinator · size S.

  4. added
    pm:queue
    on Nov 22, 2026
  5. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

    Claim: PM loop · area s2-B · 2026-11-22T20:01Z
    Session: session_01ADHkmRB34k9WUWeGpRnVNm
    Account: os-steve
    Branch: claude/issue-36472-preview-esc-edit
    Worktree: objectstack-issue-36472
    Domain: domain:ui
    Seat: repo:objectstack#2
    Area: s2-B
    File surface: the record side preview's Escape path — ui/packages/plugin-detail/src/InlineEditSaveBar.tsx and/or the component that renders the side preview drawer and owns its dismiss-on-Escape (located by the dev on origin/main), new card-named tests beside them, a changeset. ⛔ Not ui/packages/app-shell/src/views/RecordDetailView.tsx (a parallel area card, #35505, owns it this round): a fix that needs it stops and reports (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier at aad35e6885: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the side preview's Escape handling in objectstack ui/** | the full record page already treats Esc as "cancel the edit" (InlineEditSaveBar.tsx:628-660) | every user who edits a field in a side preview
    Thread-read: 7080066650
    Premise: holds — read at origin/main aad35e6 (after #36438 merged): the shared edit session's Esc handler (InlineEditSaveBar.tsx:647-657) stands down whenever an open [role="dialog"][data-state="open"] is in the document, and the side preview is itself such a layer, so the preview's own dismiss takes the key and closes the whole preview. To be confirmed by the dev in the running preview.
    Pre-claim lane: repo:objectstack whole-repo lane, area s2-B (seat 2 area order 2026-11-22); paths ui/** (domain:ui).
    Pre-claim deps: seat 7's #36438 (side preview) merged at 19:58Z; no Blocked-by: line.
    Prior rulings read: escape,preview,drawer,inline-edit,cancel → 32 hits; ADR-0007 Decision §4, §9, ADR-0027 Decision §2, §6, §11, ADR-0037 Decision §1–§3, ADR-0045 Decision §2, §6; thread: none.
    Fold-or-serial: not folded — #35505 is the only other claimable s2-B card; different mechanism, disjoint files.
    Serial constraints cleared: no open PR touches InlineEditSaveBar.tsx or the record drawer files at 2026-11-22T20:01Z (open-PR file read)

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 22, 2026
  7. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

    os-dev-report

    {
      "issue": 36472,
      "status": "blocked",
      "branch": "claude/issue-36472-preview-esc-edit",
      "pr": null,
      "session": "session_01ADHkmRB34k9WUWeGpRnVNm",
      "premise_still_valid": true,
      "summary": "Stopped on the dispatch order's rule: scripts/pm/overlap-check.mjs exits 1 against open draft PR #36547 (card #36475, same seat). Both PRs change InlineEditSaveBar.tsx, and they collide in two mechanical hunks: the first line of the keyboard effect and its dependency list (keep both sides). The fix is implemented, tested and pushed (head f062ec5ac4, origin/main f3a8a13c14 merged in); no PR is open yet. Mechanism confirmed in code by ablation, with both halves of the PM hypothesis holding: (1) the drawer's Radix layer hears Esc on the document in the capture phase and, at the stack's root, dismisses the whole preview before the session's window listener runs; (2) the session would also stand down anyway, because the drawer itself matches its open-dialog selector. Fix: NavigationOverlay holds the drawer open while it draws a data-owns-pane-escape element. The edit session's save bar carries that marker while editing. Inside a pane, the session ignores defaultPrevented (the pane marks every key it holds itself open on). It judges a layer stacked over it by an open-layer query that excludes the dialog holding it, read at press time (window capture phase) as well as at bubble time. Changed-content Esc = direct discard, the same as the full page (InlineEditContext cancel is teardown: draft cleared, no prompt; measured in code, not yet in the browser). Not yet done, and not blocked by the overlap: open the draft PR, derived gates, browser check (example CRM account and lead; HotCRM is not in this container).",
      "tests": "head 264d9cbe0c, verify lock: pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/InlineEditSaveBar.test.tsx -> Test Files 1 passed, Tests 19 passed (11 existing + 8 new, top-level describe 'Esc inside the record's side preview (objectstack#36472)' in the existing harness file, driving the real NavigationOverlay). Package suites: pnpm --dir ui exec vitest run packages/plugin-detail/ packages/components/ -> Test Files 917 passed | 2 skipped, Tests 8779 passed | 42 skipped, TESTEXIT=0. Ablation via scripts/ablation-replace.mjs (src is vitest-aliased, no dist step): leg A, drawer hold removed -> 6 failed | 13 passed (the first attempt was a no-op the tool refused, because the replacement text ') {' was already in the file; redone with a distinct marker); leg B, the holding dialog counted as a layer over the session -> 5 failed; leg C, defaultPrevented trusted inside a pane -> 5 failed; leg D, no press-time snapshot -> 1 failed (the capture-phase layer-close case). Every leg restored blob == HEAD and git diff HEAD empty.",
      "gates": "pnpm --filter @object-ui/plugin-detail type-check TCEXIT=0; pnpm --filter @object-ui/components type-check TCEXIT=0 (each exit captured per part; the lock's batch-last-exit line covers only the last part). node scripts/pm/overlap-check.mjs -> VERDICT overlap exit 1 (#36547 conflicts in ui/packages/plugin-detail/src/InlineEditSaveBar.tsx; origin/main merges cleanly). Derived gate list (dispatch-gates --commands / --ran): NOT MEASURED, reason: stopped on the overlap rule before the final commit. CI: no PR yet.",
      "dogfood_battery": "n/a — no `!` in the title and no (narrowing) arm",
      "mcp_calls": "3 — mcp__github__issue_read x2 (get, get_comments on #36472), mcp__github__pull_request_read x1 (get #36547); no write tools",
      "api_writes": "1 — POST issues/36472/comments (this os-dev-report, via post-stamped.mjs)",
      "open_questions": [
        { "question": "Order against #36547 (the per-field in-place editor, card #36475), which conflicts on InlineEditSaveBar.tsx", "options": ["A: open this draft PR now; whichever PR lands second merges main and keeps both sides of the two hunks (#36547's `face === 'field'` early return and `face` dependency, plus this PR's capture listener). The changes compose: the field face draws no bar, so it carries no pane marker, and its own Radix layer owns Esc.", "B: wait for #36547 to land, then merge main, re-run the tests and open the PR."], "recommendation": "A, because the conflict is mechanical and the behaviours compose. #36547 removes only the click-a-value path into the whole-record session; that session is still reached in a pane (an authored page's double-click, a page with no record-context writer), and this fix covers it." },
        { "question": "Once #36547 lands, the card's own repro (click a value in the preview, then Esc) goes through #36547's in-place editor, whose Esc its PR says is already its own. Should the card's acceptance be re-read against the whole-record session that remains?", "options": ["A: keep this card for the whole-record session in a pane", "B: fold the remaining case into #36475"], "recommendation": "A; the card's ruling text is about edit state in the preview, whatever the entry path." }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · noted, not filed — at the drawer's root, Esc pressed inside a plain text field with no edit session dismisses the preview (handleDrawerEscape applies escapeOwnedByTarget only below the root); pre-existing, read in code only, not measured in the browser"]
    }
  8. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm

    os-dev-report

    {
      "issue": 36472,
      "status": "done",
      "branch": "claude/issue-36472-preview-esc-edit",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36551",
      "session": "session_01ADHkmRB34k9WUWeGpRnVNm",
      "premise_still_valid": true,
      "summary": "Draft PR #36551 (head 49024f4a31, main merged at 87c7bbaf45 after #36547 landed; both conflict hunks kept). In the record's side preview, Esc during an inline edit now ends the edit and the preview stays; the next Esc closes the preview. Changed content + Esc = DIRECT DISCARD (直接放弃): no prompt, nothing written, the same as the full page. The full page was measured in the browser: Esc with a change ends the edit, opens no dialog and writes nothing. Both halves of the mechanism hypothesis held. (1) The drawer's Radix layer dismissed the pane in the document capture phase. (2) The session treated its own host dialog as a layer over it. The fix: NavigationOverlay holds the drawer open while it draws a data-owns-pane-escape element, and InlineEditSaveBar carries that marker. Inside a pane the save bar disregards defaultPrevented and excludes the dialog that holds it from its layer check, read at press time and at bubble time. Scope as decided: this card keeps the whole-record session in a pane. On the merged head the card's original click-a-value path opens #36547's per-field editor, re-measured in the browser on account and lead: Esc closes the editor only and the preview stays; a change is discarded with no write. HotCRM lead: NOT MEASURED (repo not in the container); the CRM example's lead was measured instead.",
      "tests": "head 49024f4a31, verify lock, after rebuilding the closures (packages/spec moved in the merge): pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/InlineEditSaveBar.test.tsx -> 1 file, 19 passed (8 new, a top-level describe in the existing harness file, driving the real NavigationOverlay). pnpm --dir ui exec vitest run packages/plugin-detail/ packages/components/ -> Test Files 918 passed | 2 skipped, Tests 8792 passed | 42 skipped. Ablation at 264d9cbe0c (scripts/ablation-replace.mjs, src vitest-aliased): drawer hold removed 6 failed; holding dialog counted as a layer 5 failed; defaultPrevented trusted in a pane 5 failed; no press-time read 1 failed. All legs restored blob == HEAD. The first drawer-leg attempt was a refused no-op and was redone. Browser (Playwright + Chromium, CRM example, --fresh backend): before (the two files at origin/main) the preview closed on the first Esc and a change was lost with it; after, the behaviour is as above for account and lead, a select popover closes alone, and the full page is unchanged.",
      "gates": "type-check: @object-ui/plugin-detail exit 0, @object-ui/components exit 0. overlap-check: VERDICT clean exit 0 (after the merge; the earlier exit 1 against #36547 was the reason for the queueing). dispatch-gates --commands at 49024f4a31: 38 derived, 38 run, all exit 0, recorded in /mnt/project-files/objectstack-seat2/36472-gates-ran.txt (read back after 10 s, identical). --ran: 38 run, 0 NOT-MEASURED, 0 UNRUN. check:new-line-citations: 0 new. PR check-runs on 49024f4a31: all success, including the eleven required contexts (Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI 16/16 shards, Build & E2E UI, Live E2E UI, Dogfood Regression Gate); Build Core skipped by its path selector; Check Changeset success.",
      "dogfood_battery": "n/a — no `!` in the title and no (narrowing) arm",
      "mcp_calls": "4 — mcp__github__issue_read x2 (get, get_comments #36472), mcp__github__pull_request_read x2 (get #36547, get_check_runs #36551); no write tools. Plus one gh api read of a workflow run's head_sha.",
      "api_writes": "4 relay strokes — POST issues/36472/comments (first os-dev-report, blocked) · pr_create #36551 (POST pulls, draft, + POST issues/36551/assignees os-steve) · issue_patch #36551 body (PATCH issues/36551) · POST issues/36472/comments (this report)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · noted in the PR's Acceptance notes, not filed (seat decision) — at the drawer's root with no edit session, Esc pressed inside a plain text field closes the preview; the card says Esc closes the preview when not editing"],
      "deviations": "(1) Read ui/AGENTS.md after the first ui/ edit, not before; the edits complied. (2) Pushed the first main-merge commit before running overlap-check. (3) An unquoted heredoc let bash expand the backticked commands inside a PR-body draft. That ran pnpm --dir ui exec vitest run in the shared main checkout /home/user/objectstack, unlocked, for about 2 minutes. I traced the process tree to my own command and killed it; the main checkout's git status stayed clean and no corrupted body was sent. All later bodies were built with quoted heredocs and argv-only Python."
    }
  9. removed
    pm:dispatched
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions