Title: HTML 页面批注:桌面 Agent Browser 预览、图钉与批量发送 · Issue #193 · tmoonlight/acecode · GitHub
Open Graph Title: HTML 页面批注:桌面 Agent Browser 预览、图钉与批量发送 · Issue #193 · tmoonlight/acecode
X Title: HTML 页面批注:桌面 Agent Browser 预览、图钉与批量发送 · Issue #193 · tmoonlight/acecode
Description: Problem Statement ACECode 桌面用户可以在 Agent Browser 中打开网页,却无法直接指出渲染后的元素或区域应怎样修改。现有源码选区批注针对源码文字,不能替代页面批注。用户只能口述颜色、文案与间距,模型容易定位错元素或文件,也难以区分已确认的改动与临时尝试。 Solution 在 Windows、macOS 桌面 Agent Browser 已打开的网页上提供批注模式。用户选中元素,经元素控制按钮打开宿主控制的属性浮窗,实时预览文本和属性...
Open Graph Description: Problem Statement ACECode 桌面用户可以在 Agent Browser 中打开网页,却无法直接指出渲染后的元素或区域应怎样修改。现有源码选区批注针对源码文字,不能替代页面批注。用户只能口述颜色、文案与间距,模型容易定位错元素或文件,也难以区分已确认的改动与临时尝试。 Solution 在 Windows、macOS 桌面 Agent Browser 已打开的网页上提供...
X Description: Problem Statement ACECode 桌面用户可以在 Agent Browser 中打开网页,却无法直接指出渲染后的元素或区域应怎样修改。现有源码选区批注针对源码文字,不能替代页面批注。用户只能口述颜色、文案与间距,模型容易定位错元素或文件,也难以区分已确认的改动与临时尝试。 Solution 在 Windows、macOS 桌面 Agent Browser 已打开的网页上提供...
Opengraph URL: https://github.com/tmoonlight/acecode/issues/193
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HTML 页面批注:桌面 Agent Browser 预览、图钉与批量发送","articleBody":"## Problem Statement\n\nACECode 桌面用户可以在 Agent Browser 中打开网页,却无法直接指出渲染后的元素或区域应怎样修改。现有源码选区批注针对源码文字,不能替代页面批注。用户只能口述颜色、文案与间距,模型容易定位错元素或文件,也难以区分已确认的改动与临时尝试。\n\n## Solution\n\n在 Windows、macOS 桌面 Agent Browser 已打开的网页上提供批注模式。用户选中元素,经元素控制按钮打开宿主控制的属性浮窗,实时预览文本和属性修改;同一条批注可包含多个元素及最多一块区域,共用描述和编号图钉。保存只留下预览与图钉,不发送、不写磁盘文件。用户将待发送批注一次性发送到发起时的当前对话,包含逐项旧值与新值以及一张发送时的整页截图,再由模型修改真实文件。\n\n## User Stories\n\n1. As an ACECode desktop user, I want to enable annotation mode from the Agent Browser toolbar, so that I can point at the rendered page rather than describe source locations.\n2. As a Windows desktop user, I want annotation controls to work over the native browser surface, so that the chat pane is not a substitute for page interaction.\n3. As a macOS desktop user, I want the same annotation workflow, so that the feature does not depend on my desktop platform.\n4. As a desktop user, I want to annotate an already loaded local-service or remote webpage, so that I can discuss the page I am actually viewing.\n5. As a desktop user, I want clicking an element to show an outline and control button, so that I can verify my target before opening its popup.\n6. As a desktop user, I want the control button to open a popup identifying the element tag, so that I can describe and preview changes to the intended element.\n7. As a desktop user, I want to edit visible text without destroying nested elements, so that previewing copy changes preserves the page structure.\n8. As a desktop user, I want to preview text color and background changes, so that I can communicate the intended appearance precisely.\n9. As a desktop user, I want to preview opacity changes, so that I can evaluate the result in context.\n10. As a desktop user, I want to preview font, font size and font weight changes, so that I can specify typography visually.\n11. As a desktop user, I want to preview corner radius, border color and border width changes, so that I can specify an element's outline.\n12. As a desktop user, I want to preview width and height changes, so that I can communicate sizing requirements.\n13. As a desktop user, I want the aspect-ratio lock to be off initially and to lock the current ratio when enabled, so that linked resizing is deliberate.\n14. As a desktop user, I want to preview spacing, padding and margin changes, so that I can evaluate distances on the page.\n15. As a desktop user, I want only actual changes to become recorded differences, so that unchanged properties do not obscure my request.\n16. As a desktop user, I want to cancel the current unsaved draft, so that its changes are reverted without losing earlier saved previews.\n17. As a desktop user, I want to annotate the same element again, so that a later draft can build on a saved preview without corrupting cancellation.\n18. As a desktop user, I want to add other elements to the same draft and return to its popup, so that related targets share one description and pin.\n19. As a desktop user, I want to drag a page region into an annotation, so that I can indicate an area that is not a single element.\n20. As a desktop user, I want adding another region to replace the existing region, so that each annotation has at most one region.\n21. As a desktop user, I want a region to identify a range without offering text or property edits, so that region selection does not modify unrelated elements.\n22. As a desktop user, I want saving a draft to create a numbered pin without sending, so that I can collect several requests before involving the model.\n23. As a desktop user, I want the bottom annotation count to include only unsent annotations, so that I know what the next send will contain.\n24. As a desktop user, I want an independent original-view toggle that temporarily disables previews while retaining visible pins, so that I can compare the original and proposed appearance.\n25. As a desktop user, I want restoring preview view to reapply saved changes, so that comparison does not discard my work.\n26. As a desktop user, I want leaving annotation mode to hide editing controls but retain saved previews and pins, so that ordinary browsing does not erase annotations.\n27. As a desktop user, I want one send to produce one user message with numbered targets, descriptions and text/property old-to-new differences, so that the model receives one coherent request.\n28. As a desktop user, I want exactly one full-page screenshot per sending batch, including below-the-fold content, so that the model sees the whole page rather than a viewport or cropped region.\n29. As a desktop user, I want differences to be sendable without a description, so that a precise visual edit does not require redundant prose.\n30. As a desktop user, I want annotations with neither description nor differences excluded from sending, so that empty requests do not start model work.\n31. As a desktop user, I want the model to start work only after explicit batch sending, so that saving and previewing remain local operations.\n32. As a desktop user, I want sending to preserve composer drafts and attachments, so that annotations do not overwrite an unrelated message I am writing.\n33. As a desktop user, I want sending during an active model turn to queue a new turn rather than steer the active one, so that annotation requests remain coherent.\n34. As a desktop user, I want a sending batch bound to its initiating conversation, so that switching conversations cannot misdirect the request.\n35. As a desktop user, I want annotations added while a batch is sending to remain for the next batch, so that concurrent editing does not change the submitted request.\n36. As a desktop user, I want annotations marked sent only after receipt is confirmed, so that failed or uncertain submissions do not silently disappear.\n37. As a desktop user, I want retries of the same batch to avoid duplicate messages, so that recovery does not ask the model to perform the same work twice.\n38. As a desktop user, I want sent previews and pins retained, the pending bar hidden when empty, and future numbers increasing, so that I can continue annotating without confusing previous requests.\n39. As a desktop user, I want navigation or refresh with unsaved or unsent work to ask for confirmation and default to staying, so that I do not lose context accidentally.\n40. As a desktop user, I want replaced documents and removed targets marked invalid without automatic relocation, so that old changes cannot affect a different page or a similar element.\n41. As a desktop user, I want screenshot or attachment preparation failure to retain the entire pending batch without partial submission, so that I can retry safely.\n42. As a desktop user, I want to annotate without a usable conversation but have sending blocked, so that the app neither invents a conversation nor redirects my work.\n43. As a desktop user, I want annotation previews never to write HTML or CSS files, so that only the model acting on my sent request modifies project files.\n44. As a source-selection annotation user, I want my existing workflow unchanged, so that page annotations add capability without replacing source annotations.\n45. As a desktop user, I want webpage content isolated from conversation-sending capabilities, so that an untrusted page cannot submit messages through annotation infrastructure.\n\n## Implementation Decisions\n\n- Scope is Windows/macOS desktop Agent Browser loaded webpages. Page-side code owns target locating, outlines, numbered markers, region geometry and temporary previews. The host owns the property popup displayed over the browser; a chat-column panel is not a substitute.\n- Preserve the boundary against exposing host objects or general web-message capabilities to arbitrary webpages. New communication must be narrowly scoped, validated, and tied to the correct page/document; webpages must not gain conversation-sending capabilities. Exact native popup and restricted communication APIs require detailed design before implementation.\n- Provide a toolbar annotation toggle. Element click selects; its control button opens the popup. The popup supports adding targets and adding/replacing one region. Closing the mode hides controls without clearing saved pins/previews. Saved annotations cannot be edited or deleted in this release.\n- Support visible text, text color, background, opacity, font, font size, font weight, radius, border color, border width, width, height, spacing, padding and margin. Width/height aspect lock is initially off and locks the current ratio when enabled. A region is selection only, not an editable element.\n- Use a separate preview stylesheet rather than overwriting original inline declarations. Preserve reversible text-node information rather than replacing whole-element textContent. Record only actual old/new changes. Cancellation reverts only the current draft, retaining saved layers even on the same target. Exact cascade and text restoration rules must be specified and tested.\n- Independent original-view toggle temporarily disables all preview changes, keeps pins visible and retains annotations; toggling back restores previews. This does not add a separate hide-markers feature. Previewing never writes HTML/CSS files.\n- Each annotation records identity, increasing display number, page/document identity, multiple element locators/tags/necessary text summaries, at most one page-coordinate region, shared description, per-element actual old/new differences, preview association and pending/sending/sent status. DOM references remain runtime-only. The screenshot belongs to a batch, not each annotation.\n- Save creates a pin, not a conversation submission. The bottom count includes only unsent annotations. A batch sends only pending sendable records, one user message listing numbered targets/descriptions/differences and one full-page screenshot captured at send time. An empty description with differences is sendable; no description and no differences is not.\n- Bind a batch to its initiating conversation and freeze its membership. New annotations created during sending belong to the next batch. Conversation switching cannot retarget the batch. Prepare screenshot and attachment before submitting; failures must not submit partial messages.\n- Reuse the conversation submission path, without UI input simulation and without mutating composer drafts/attachments. If the model is busy, queue a new turn instead of steering its active turn. Mark sent only after acceptance is acknowledged. Preserve uncertain batches for reconciliation/retry with the same identity and implement actual end-to-end deduplication; merely generating a client identifier is insufficient.\n- After successful send, keep previews/pins, clear only the accepted batch's pending count and hide the empty bottom bar. New annotation numbers continue increasing.\n- Active navigation/refresh with draft or pending work requires confirmation, default stay, no auto-send. A replaced document stops old previews and invalidates unsent records; never reuse old locators or auto-attach to a new document. A dynamically removed target invalidates its record and blocks the affected batch rather than changing a similar element.\n- Screenshot/attachment errors preserve pending state, previews and retry ability. Missing/unavailable conversation blocks sending without creating or redirecting a conversation. Retention is promised only during the current application run, not across restart.\n- Invalid-record recovery/cleanup remains a detailed-design gap; do not resolve it by adding forbidden saved-annotation editing/deletion. Full-page capture beyond the viewport and explicit submission receipt/deduplication are implementation requirements, not capabilities assumed present today.\n- Implement in the current ACECode checkout through an OpenSpec change before product code. Preserve existing module boundaries, ownership/lifetime rules, minimal UI copy and modal policies. Source-selection annotations are a separate feature and must not be repurposed.\n\n## Testing Decisions\n\n- User confirmed these testing seams in this conversation. Prefer the highest practical integration boundary: desktop Agent Browser annotation actions through the existing conversation submission entry point. Assert externally visible page state and submitted messages rather than private structures, exact generated selectors, or incidental component layout.\n- Supplement that boundary only where needed with behavior tests for annotation lifecycle/differences, reversible DOM preview, and batch submission. Inject boundary dependencies for capture, conversation receipt and failures; avoid tests that rely on real network/model timing.\n- Test all supported properties, actual-difference filtering, text child-node preservation/restoration, aspect lock, draft cancellation over saved previews, repeated annotation of one element, multiple elements/shared pin, single-region replacement, original-view restoration, mode closure, increasing numbers and pending counts.\n- Test one-message/one-full-page-image batching, differences-only requests, empty-request rejection, busy queue rather than steer, composer preservation, conversation switching, additions during sending, capture/attachment failure, failed/uncertain receipt and deduplicated retry.\n- Test document replacement, target removal, stale page callbacks, navigation default stay, missing conversation, no disk writes and the security boundary against untrusted page messages.\n- Existing prior art includes browser navigation/page-ownership GoogleTests, IPC browser runtime tests, frontend browser bridge/surface-coordinator behavior tests, and source-selection annotation sanitization/submission regression tests. Reuse their frameworks and boundary patterns instead of inventing multiple parallel testing systems.\n- Run real Windows and macOS desktop sequences: select, popup, edit/cancel, multiple targets/region, save pins, original view, batch send, then add another annotation. Verify every supported field, no pre-send model work or HTML/CSS disk edits, continued pins/previews, count reset, and screenshot pixels beyond the viewport on a long page.\n- Automated results do not replace either platform's manual acceptance. Record each unexecuted check explicitly; external reference-app observation is not ACECode acceptance. Product tests and both-platform acceptance have not yet run.\n\n## Out of Scope\n\n- Linux, TUI, and rendering standalone HTML files in a file-preview feature.\n- Replacing or modifying the established source-selection annotation workflow.\n- Immediate send on click/save, direct preview writes to HTML/CSS, and a second annotation UI embedded in the webpage.\n- Editing/deleting saved annotations, drawing, voice, line-height, layout direction, distribution or alignment controls.\n- Multiple regions in one annotation, region property/text editing, per-annotation screenshots, region crops, or viewport screenshots substituted for a full-page image.\n- Automatic relocation of invalid targets, cross-restart recovery, auto-created conversations, automatic send on navigation, and a separate hide-markers feature.\n- Copying proprietary reference-app scripts into ACECode or treating a reference screen/package as proof of ACECode behavior.\n\n## Further Notes\n\nThe approved requirements and seven technical decisions are synthesized from this conversation; their original documentation lives in a separate documentation checkout and is not silently treated as the current implementation baseline. This issue records the approved product contract without changing those source documents.\n\nThe user requested the sequence to-spec, to-tickets, then implement-spec. Publish this spec with ready-for-agent, obtain approval of the vertical ticket graph before publishing tickets, then implement through OpenSpec and a single integration branch/draft PR with implementer worktrees. Review the implementation before marking ready; do not claim unexecuted cross-platform checks passed. Ticket publication must not close or modify this parent specification issue.\n","author":{"url":"https://github.com/LIUXIN557","@type":"Person","name":"LIUXIN557"},"datePublished":"2026-11-18T14:08:50Z","url":"https://github.com/tmoonlight/acecode/issues/193"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c713c348-7c03-b299-b463-48ee393e583e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E1C:3F8DC1:145D8D5:1B10995:6AFEB28E |
| html-safe-nonce | fb4e4b9de57edd8b5241d3f2673c53e6e680c33671581533e7c699fb2183bfb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTFDOjNGOERDMToxNDVEOEQ1OjFCMTA5OTU6NkFGRUIyOEUiLCJ2aXNpdG9yX2lkIjoiNjM5MTA5NDkxMTA1OTIxNDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 327d77db90a7df16a6123a4cb031ef7e66ff6394d2fcfdcf4d772808971b2849 |
| hovercard-subject-tag | issue:6469020771 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tmoonlight/acecode/193/issue_layout |
| twitter:image | https://opengraph.githubassets.com/447ec000f28bab86153b9addc46555aeb450444a84a34bd8cbf0f588fc69f3e3/tmoonlight/acecode/issues/193 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/447ec000f28bab86153b9addc46555aeb450444a84a34bd8cbf0f588fc69f3e3/tmoonlight/acecode/issues/193 |
| og:image:alt | Problem Statement ACECode 桌面用户可以在 Agent Browser 中打开网页,却无法直接指出渲染后的元素或区域应怎样修改。现有源码选区批注针对源码文字,不能替代页面批注。用户只能口述颜色、文案与间距,模型容易定位错元素或文件,也难以区分已确认的改动与临时尝试。 Solution 在 Windows、macOS 桌面 Agent Browser 已打开的网页上提供... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LIUXIN557 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e |
| turbo-cache-control | no-preview |
| go-import | github.com/tmoonlight/acecode git https://github.com/tmoonlight/acecode.git |
| octolytics-dimension-user_id | 808983 |
| octolytics-dimension-user_login | tmoonlight |
| octolytics-dimension-repository_id | 1207866437 |
| octolytics-dimension-repository_nwo | tmoonlight/acecode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1207866437 |
| octolytics-dimension-repository_network_root_nwo | tmoonlight/acecode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3f25273206cd841171bca0002261ae4c9757d934 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width