diff --git a/src/components/TicketCard.jsx b/src/components/TicketCard.jsx index 0425b94..e34a8d6 100644 --- a/src/components/TicketCard.jsx +++ b/src/components/TicketCard.jsx @@ -44,6 +44,37 @@ export default function TicketCard({ ticket, onUpdate }) { const stop = (e) => e.stopPropagation() + // #region agent log + const logClip = (e, which) => { + try { + const root = e.currentTarget + const content = root.querySelector('.dropdown-content') + if (!content) return + requestAnimationFrame(() => { + const cr = content.getBoundingClientRect() + const clippers = [] + let el = content.parentElement + while (el && el !== document.body) { + const cs = getComputedStyle(el) + if (cs.overflowX !== 'visible' || cs.overflowY !== 'visible') { + const r = el.getBoundingClientRect() + clippers.push({ + cls: String(el.className || '').slice(0, 40), + ox: cs.overflowX, oy: cs.overflowY, + cutBottom: +(cr.bottom - r.bottom).toFixed(1), + cutRight: +(cr.right - r.right).toFixed(1), + cutTop: +(r.top - cr.top).toFixed(1), + cutLeft: +(r.left - cr.left).toFixed(1), + }) + } + el = el.parentElement + } + fetch('http://127.0.0.1:7284/ingest/0747da40-b90b-4354-9b84-c9b550a81ec9', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '693b5f' }, body: JSON.stringify({ sessionId: '693b5f', runId: 'pre-fix', hypothesisId: 'A', location: 'TicketCard.jsx:hoverClip', message: 'dropdown clip measure', data: { which, contentH: +cr.height.toFixed(1), clippers }, timestamp: Date.now() }) }).catch(() => {}) + }) + } catch { /* ignore */ } + } + // #endregion + const handleCreateWorksheet = async (worksheetData, currentUser) => { const result = await createWorksheet(worksheetData, currentUser) if (result.success && worksheetData.newStatus !== ticket.status) { @@ -66,7 +97,7 @@ export default function TicketCard({ ticket, onUpdate }) {