Repository navigation
feat: overlay persisted image-region boxes (v2.13.2) #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
8054016
e7d1b35
6681688
e6fd907
a3b1ec0
2da6a18
9c2d26c
66fc696
d8a938c
7504774
381098a
6c8f31c
bd3f649
f44ec17
76dc329
6d716a1
a550f8f
05860e9
5336b28
324f1fa
c9b39eb
8b37682
519a8c3
9339e2b
57e75d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # 2.13.2 — Overlay persisted image-region boxes | ||
|
|
||
| ## Added | ||
|
|
||
| - Buyer post figures now draw persisted visual-region boxes on a reattached | ||
| source image. Selecting a box announces that region's caption or OCR. | ||
| - Invalid, missing, or out-of-bounds coordinates stay list-only. When the | ||
| bitmap cannot be reattached, the region list remains the fallback and no | ||
| locator is invented. | ||
|
|
||
| ## Changed | ||
|
|
||
| - Image-region overlay and current-region labels are translated through the | ||
| five-locale catalog (Korean, English fallback, Chinese, Japanese, | ||
| Vietnamese). | ||
| - Buyer image rendering now rejects script, SVG, external, and malformed | ||
| source URLs before they reach an image element. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # ADR 0113: Overlay persisted visual-region boxes on the source image | ||
|
|
||
| - Status: Accepted | ||
| - Date: 2026-08-20 | ||
| - Depends on: [0067](0067-visual-region-vision-agent.md), [0091](0091-visual-region-embedding-persistence.md), [0110](0110-buyer-image-evidence-rendering.md) | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0067 and ADR 0091 persist parent-relative `x_ratio`, `y_ratio`, | ||
| `width_ratio`, and `height_ratio` for each accepted visual region. ADR 0110 | ||
| renders captions, OCR, tags, and a region list, but the buyer still cannot | ||
| see which panel of the source image supplied that evidence. | ||
|
|
||
| ## Decision | ||
|
|
||
| - When the source image can be reattached and a region has a finite persisted | ||
| box inside the unit square, draw that box on the figure as a | ||
| keyboard-focusable control. Selecting it announces the persisted caption or | ||
| OCR as the current image region. | ||
| - Never invent coordinates. Invalid, missing, non-finite, zero-area, or | ||
| out-of-bounds boxes stay list-only. When the source image cannot be | ||
| reattached, keep the region list and do not draw empty overlays. | ||
| - Do not surface LLM instructions from image `unit_text`. Overlay labels come | ||
| only from persisted region caption or extracted text. | ||
| - Translate overlay and current-region labels through the five-locale UI | ||
| catalog. | ||
|
|
||
| ## Consequences | ||
|
|
||
| Buyers can locate panel-level evidence on the source image. Search and | ||
| embedding remain bound to the existing region tables. A missing bitmap still | ||
| fails closed to the list rather than fabricating a locator. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -364,6 +364,91 @@ | |
| height: auto; | ||
| } | ||
|
|
||
| .post-embedded-image-frame { | ||
| position: relative; | ||
| display: inline-block; | ||
| max-width: 100%; | ||
| } | ||
|
|
||
| .post-embedded-image-frame img { | ||
| display: block; | ||
| max-width: 100%; | ||
| height: auto; | ||
| } | ||
|
|
||
| .post-image-region-overlays { | ||
| position: absolute; | ||
| inset: 0; | ||
| } | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
Comment on lines
+514
to
+530
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: Overlay percentages assume the frame tightly wraps the bitmap Overlay boxes at PostBody.tsx position via percentage offsets relative to Was this helpful? React with 👍 or 👎 to provide feedback. |
||
|
|
||
| .post-image-region-overlay { | ||
| position: absolute; | ||
| box-sizing: border-box; | ||
| margin: 0; | ||
| padding: 0; | ||
| border: 2px solid var(--color-accent-info); | ||
| background: var(--color-accent-info-background); | ||
| cursor: pointer; | ||
| appearance: none; | ||
| } | ||
|
|
||
| .post-image-region-overlay[aria-pressed="true"] { | ||
| border-color: var(--color-accent); | ||
| background: var(--color-accent-background); | ||
| } | ||
|
|
||
| .post-image-region-overlay:focus-visible { | ||
| outline: 2px solid var(--color-accent); | ||
| outline-offset: 2px; | ||
| } | ||
|
|
||
| .post-image-current-region { | ||
| margin: 0.4rem 0 0; | ||
| font-size: 0.85rem; | ||
| color: var(--text-h); | ||
| } | ||
|
|
||
| @media (prefers-reduced-motion: no-preference) { | ||
| .post-image-region-overlay { | ||
| transition: border-color 160ms ease, background-color 160ms ease; | ||
| } | ||
| } | ||
|
|
||
| @media print { | ||
| body * { | ||
| visibility: hidden; | ||
| } | ||
|
|
||
| .popup-backdrop, | ||
| .popup-panel, | ||
| .popup-panel * { | ||
| visibility: visible; | ||
| } | ||
|
|
||
| .popup-backdrop { | ||
| position: absolute; | ||
| inset: 0; | ||
| display: block; | ||
| background: none; | ||
| } | ||
|
|
||
| .popup-panel { | ||
| position: static; | ||
| width: auto; | ||
| max-width: none; | ||
| max-height: none; | ||
| overflow: visible; | ||
| padding: 0; | ||
| border-radius: 0; | ||
| } | ||
|
|
||
| .popup-close, | ||
| .post-actions, | ||
| .post-action-status { | ||
| display: none !important; | ||
| } | ||
| } | ||
|
|
||
|
Comment on lines
+571
to
+604
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Printing any page without an open post popup yields a blank sheet The new Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. |
||
| .post-embedded-image figcaption { | ||
| margin-top: 0.4rem; | ||
| font-size: 0.85rem; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Wholesale App.css rewrite removes classes still referenced by components
This diff replaces the entire App.css with a different design system (token vars like
var(--surface)swapped forcanvas/canvastext, and shell/login/footer/button classes deleted). Classes still referenced in TSX — e.g.app-shell,login-card,app-footer,btn-primary,btn-secondary,app-header-title— no longer have rules here, and modalz-indexdeclarations on.popup-backdrop/.popup-panelwere dropped. This is far outside the stated overlay scope and is most likely inherited from the stacked parent (#307) rather than introduced by this PR, so it is not flagged as a bug, but a reviewer confirming the exact base-to-head diff should verify these removals are intentional and that login/footer/button styling and modal stacking are not regressed.Was this helpful? React with 👍 or 👎 to provide feedback.