fix(resume): fix click-blocking footer overlay + hardening on HITL resume page by waleedlatif1 · Pull Request #5381 · simstudioai/sim · GitHub
Skip to content

fix(resume): fix click-blocking footer overlay + hardening on HITL resume page#5381

Merged
waleedlatif1 merged 3 commits into
stagingfrom
worktree-hitl-resume-fix
Jul 2, 2026
Merged

fix(resume): fix click-blocking footer overlay + hardening on HITL resume page#5381
waleedlatif1 merged 3 commits into
stagingfrom
worktree-hitl-resume-fix

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Fix: SupportFooter rendered position: absolute with no space reserved for it in InterfacesShell/AuthShell/file-share auth gate, so it silently overlapped and ate clicks on whatever content ended up in its ~50px footprint — on the resume page this was the "Resume Execution" button itself. Root-caused via live reproduction (seeded paused execution + headless browser), confirmed fix by re-running the same repro (click now dispatches the resume POST and gets 200).
  • Applied the same fix to /invite and /f/[token] (public file-share auth gate), which shared the identical absolute-positioning pattern
  • Hardening: handleResume no longer fails silently on validation errors or unexpected exceptions — always surfaces a visible error
  • Fix: getPauseContextDetail no longer duplicates a pause point's full (potentially large) response payload in the same API response
  • Hardening: oversized HITL display-data values are now truncated in the resume page preview instead of rendering unbounded

Type of Change

  • Bug fix

Testing

  • Reproduced the original bug locally (seeded a paused execution matching the reported production data shape, drove it with a real headless browser) and confirmed the fix resolves it end-to-end
  • Added unit tests for the payload de-dup fix in human-in-the-loop-manager.test.ts
  • bun run lint, typecheck, and existing test suite all pass

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI layout and resume-page/API response shaping with clearer errors; no auth or execution-core logic changes beyond omitting duplicate payload fields clients already get on pausePoint.

Overview
Fixes a click-blocking overlay on tall interface pages by adding a static positioning mode to SupportFooter and switching resume, invite, and public file-share auth shells from absolute to static, so the footer sits in document flow instead of overlapping controls like Resume Execution.

On the HITL resume page, display data previews are capped at 5,000 characters with a truncation notice; handleResume now shows errors when no pause point is selected, form validation fails, or payload preparation throws. getPauseContextDetail strips response.data from execution.pausePoints so large HITL payloads are not duplicated in one API response (covered by new unit tests).

Reviewed by Cursor Bugbot for commit a672b26. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a click-blocking overlay bug on the HITL resume page where SupportFooter was rendered with position: absolute but had no reserved space in the layout, causing it to silently overlap and intercept clicks on underlying content (including the "Resume Execution" button). The same fix is applied to /invite and /f/[token] layouts that shared the same pattern.

  • Footer overlay fix: SupportFooter gains a 'static' position variant that renders in normal document flow; InterfacesShell, InviteLayout, and PublicFileAuthShell are updated to use it.
  • handleResume hardening: Validation logic is wrapped in a try-catch so unexpected exceptions surface as visible errors instead of failing silently; validation field errors now also set a top-level error message.
  • Payload de-dup: getPauseContextDetail strips response.data from execution.pausePoints entries so the (potentially large) HITL display payload isn't duplicated in the same API response — the full payload is already returned via the top-level pausePoint field. New unit tests cover this behavior.
  • Truncation hardening: renderStructuredValuePreview now caps object and string values at 5,000 prettified characters with a visible overflow notice, preventing unbounded DOM rendering.

Confidence Score: 5/5

Safe to merge — all changes are targeted bug fixes with no regressions introduced to existing flows.

All three code paths touched (footer positioning, resume validation, payload de-dup) are mechanically straightforward and well-tested. The position:'static' change is additive and doesn't affect existing fixed/absolute callers. The data: undefined stripping is a standard JSON-serialization idiom. The handleResume refactor preserves all prior early-return semantics and adds proper error surfacing. Unit tests for the new de-dup behavior assert the right invariants.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/(auth)/components/support-footer.tsx Adds 'static' as a valid position prop variant and conditionally suppresses the pin-to-bottom Tailwind classes when position === 'static'. JSDoc explains the hazard clearly. Change is correct.
apps/sim/app/(interfaces)/components/interfaces-shell/interfaces-shell.tsx Switches SupportFooter from position='absolute' to position='static' so the footer no longer overlays scroll content. Minimal, targeted fix.
apps/sim/app/(interfaces)/resume/[workflowId]/[executionId]/resume-page-client.tsx Adds truncation for oversized preview values and wraps handleResume validation in a try-catch with visible error surfacing. Logic is correct; setLoadingAction(false) is always called via either explicit early returns or the mutation's finally block.
apps/sim/app/f/[token]/public-file-auth-shell.tsx Identical footer positioning fix applied to the public file-share auth gate. One-line change, correct.
apps/sim/app/invite/components/layout.tsx Same footer positioning fix for the invite layout. One-line change, correct.
apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts Strips response.data from execution.pausePoints in getPauseContextDetail to prevent payload duplication. Uses data: undefined which is correctly omitted by JSON.stringify. Type assignment (PausedExecutionDetail → PausedExecutionSummary) is valid via structural typing.
apps/sim/lib/workflows/executor/human-in-the-loop-manager.test.ts Adds two new getPauseContextDetail test cases: verifies that response.data is stripped from execution.pausePoints while remaining intact on the top-level pausePoint, and that a missing contextId returns null. Tests are well-structured and assert the right invariants.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Browser
    participant ResumePageClient
    participant API as Resume API Route
    participant Manager as PauseResumeManager

    Browser->>ResumePageClient: Click "Resume Execution"
    Note over Browser,ResumePageClient: Footer no longer overlaps button (position:static fix)
    ResumePageClient->>ResumePageClient: handleResume() — validate form fields
    alt Validation error
        ResumePageClient-->>Browser: setError() — visible error message
    else Valid payload
        ResumePageClient->>API: "POST /resume {contextId, input}"
        API->>Manager: getPauseContextDetail()
        Manager->>Manager: Strip response.data from execution.pausePoints
        Manager-->>API: "{execution (data stripped), pausePoint (full data)}"
        API-->>ResumePageClient: "{ok, payload}"
        ResumePageClient-->>Browser: Update UI (status, queue position)
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Browser
    participant ResumePageClient
    participant API as Resume API Route
    participant Manager as PauseResumeManager

    Browser->>ResumePageClient: Click "Resume Execution"
    Note over Browser,ResumePageClient: Footer no longer overlaps button (position:static fix)
    ResumePageClient->>ResumePageClient: handleResume() — validate form fields
    alt Validation error
        ResumePageClient-->>Browser: setError() — visible error message
    else Valid payload
        ResumePageClient->>API: "POST /resume {contextId, input}"
        API->>Manager: getPauseContextDetail()
        Manager->>Manager: Strip response.data from execution.pausePoints
        Manager-->>API: "{execution (data stripped), pausePoint (full data)}"
        API-->>ResumePageClient: "{ok, payload}"
        ResumePageClient-->>Browser: Update UI (status, queue position)
    end
Loading

Reviews (3): Last reviewed commit: "fix(resume): show em dash for empty-stri..." | Re-trigger Greptile

…sume page

- SupportFooter rendered position:absolute with no space reserved for it
  in InterfacesShell/AuthShell/file-share auth gate, silently overlapping
  and eating clicks on whatever content ended up in its ~50px footprint
  (on the resume page, the Resume Execution button itself)
- Applied the same fix to /invite and /f/[token], which shared the
  identical absolute-positioning pattern
- handleResume no longer fails silently on validation errors or
  unexpected exceptions
- getPauseContextDetail no longer duplicates a pause point's full
  response payload in the same API response
- Oversized HITL display-data values are now truncated in the resume
  page preview instead of rendering unbounded
@waleedlatif1 waleedlatif1 force-pushed the worktree-hitl-resume-fix branch from 45ed6ec to 66c7a10 Compare July 2, 2026 20:40
The object-branch truncation notice sliced from the prettified
JSON.stringify(value, null, 2) but reported the total against the
compact JSON.stringify(value).length, which could show a nonsensical
"5,000 of 4,800 characters shown" when the compact form is shorter
than the prettified slice. Derive both from the same string.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5c86fae. Configure here.

renderStructuredValuePreview only treated null/undefined as empty; an
empty string fell through to the plain-text branch and rendered as a
bordered, padded, contentless pill that reads as a stray UI element
(e.g. an unstyled toggle) in the Display Data table.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@waleedlatif1 waleedlatif1 merged commit 4085a1e into staging Jul 2, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the worktree-hitl-resume-fix branch July 2, 2026 22:11

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a672b26. Configure here.

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