Skip to content

fix(assets): constrain candidates preview panel height to viewport#2356

Open
SajalChaplot wants to merge 4 commits into
mainfrom
draft-preview-ui-fix
Open

fix(assets): constrain candidates preview panel height to viewport#2356
SajalChaplot wants to merge 4 commits into
mainfrom
draft-preview-ui-fix

Conversation

@SajalChaplot

@SajalChaplot SajalChaplot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Previously the preview in drafts tab was smaller that user must open it in a detailed view to see the asset properly. This PR improves UX by increasing the height of the preview.

image

Test plan

  • Open Drafts tab with one or more image candidates
  • Confirm the preview panel fits on screen without scrolling at various viewport sizes
  • Confirm thumbnails below the preview are visible without scrolling
  • Confirm switching between candidates via thumbnails works
  • Confirm portrait and landscape images both render correctly with object-contain

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@SajalChaplot

Copy link
Copy Markdown
Contributor Author

@builderio-bot look at latest PR feedback and fix anything you agree with. Be skeptical. Reply to every comment (directly on the comment thread of each comment) if you fixed it or not and why. then check back every 2 minutes on a loop and see if any new feedback posted, until at least 20 minutes go by without any new feedback posted we want to address, including making sure CI passes too and no merge conflicts (make sure code is mergeable)

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Visual recap — screenshot failed

A recap was published, but the PR-comment screenshot could not be captured or uploaded. Open the interactive recap directly:

Open the full interactive recap

Diagnostic:

light: page.screenshot: Timeout 30000ms exceeded. Call log: - taking page screenshot - waiting for fonts to load...

@builder-io-integration

Copy link
Copy Markdown
Contributor

Checked latest PR feedback: there are no inline review comments or review threads posted yet (only this trigger comment).

CI check found a real issue: Lint & format was failing due to an oxfmt formatting violation (a stray blank line) in templates/assets/app/routes/brand-kits.$id.tsx. Fixed in c278fcc by running oxfmt --write on that file — verified pnpm run lint (fmt:check + oxlint + typecheck) now passes locally.

No merge conflicts: git merge-tree against main shows a clean merge, and GitHub reports the PR as MERGEABLE.

Will keep checking every ~2 minutes for new feedback/CI results until 20 minutes pass with nothing new to address.

builder-io-integration[bot]

This comment was marked as outdated.

@builder-io-integration

Copy link
Copy Markdown
Contributor

Update: The automated Review Agent (Builder bot) reviewed the changes and reported looks good ✅ / Risk: Low — no confirmed bugs, no action items. Nothing to fix there.

Separately, the Fast tests required check failed on the latest push, but it's unrelated to this PR's diff: packages/core/src/a2a/client.spec.ts > A2AClient > bounds a hung task-status request by the overall poll deadline timed out (5000ms) — a pre-existing fake-timer/real-timeout test that this PR never touches (PR only changes templates/assets/app/global.css and templates/assets/app/routes/brand-kits.$id.tsx). That test file was last modified in unrelated PRs (#2349, #2337), so this looks like a flake rather than something introduced here.

I don't have permission to re-run the workflow on this fork PR (gh run rerun returned a 403), so this may need a maintainer to re-run the failed job, or it may self-resolve on the next push. Will keep monitoring.

@builder-io-integration

Copy link
Copy Markdown
Contributor

I encountered an error while processing your request. Please try again.

@builder-io-integration

Copy link
Copy Markdown
Contributor

Final status after 20+ min of monitoring with no new feedback:

  • Fixed: Lint & format CI failure — an oxfmt formatting violation in templates/assets/app/routes/brand-kits.$id.tsx (stray blank line). Pushed in c278fcc; pnpm run lint now passes locally and in CI.
  • Reviewed: Automated Review Agent bot review — reported looks good ✅, Risk: Low, no confirmed bugs, nothing actionable.
  • No inline review comments or human review threads were posted on this PR to address.
  • Mergeable: MERGEABLE, no merge conflicts with main.
  • Outstanding: mergeStateStatus is BLOCKED because the branch protection rule requires 1 approving human review (not something I can resolve). The Fast tests required check is still failing on a pre-existing flaky test unrelated to this PR's diff (packages/core/src/a2a/client.spec.ts — a fake-timer poll-deadline test that timed out; last touched in unrelated PRs Stream delegated agent activity and refresh shared defaults #2349/Improve MCP connection and Content editor flows #2337). I don't have permission to re-run the workflow on this fork PR (gh run rerun → 403), so this needs a maintainer to re-run the job or push a follow-up commit to retrigger CI. The Generate + run standalone Chat check is also failing but is not a required check.

Stopping the monitoring loop here since no new feedback has appeared in the last 20+ minutes.

@steve8708

Copy link
Copy Markdown
Contributor

@builderio-bot look at latest PR feedback and fix anything you agree with. Be skeptical. Reply to every comment (directly on the comment thread of each comment) if you fixed it or not and why. then check back every 2 minutes on a loop and see if any new feedback posted, until at least 20 minutes go by without any new feedback posted we want to address, including making sure CI passes too and no merge conflicts (make sure code is mergeable)

also rebase off latest main - that might fix the e2e issue

@builder-io-integration

Copy link
Copy Markdown
Contributor

Checked latest PR feedback: still no inline review comments or human review threads posted (only trigger comments).

Rebased onto latest main as requested (12 commits, clean rebase, no conflicts) — pushed as d1ee630. Note: I checked and the specific fix that resolves the flaky packages/core/src/a2a/client.spec.ts poll-deadline timeout (1de8f8c2 - fix: increase timer step for polling in tests to improve CI performance) lives on an unrelated unmerged branch (korey/moar-updates-realtime), not on main yet — so that specific test may still be flaky after this rebase. The rebase may still help the Generate + run standalone Chat e2e failure if it was caused by since-fixed scaffolding/toolkit issues on main. Re-running the full CI suite now to check.

Will keep monitoring every ~2 minutes for new feedback and CI results until 20 minutes pass with nothing new.

builder-io-integration[bot]

This comment was marked as outdated.

@builder-io-integration

Copy link
Copy Markdown
Contributor

Great news — the rebase fixed the CI issues. All required checks now pass, including:

  • Fast tests (previously failing on the packages/core/src/a2a/client.spec.ts poll-deadline timeout)
  • Generate + run standalone Chat (previously failing with /chat did not render... No route matches URL /chat)
  • Lint & format, Build, Scaffold E2E, Plan E2E tests, Content parity, Content DB tests, Core integration tests

The automated Review Agent re-reviewed the rebased code and again reported looks good ✅ / Risk: Low, no new issues.

PR is MERGEABLE with no conflicts. Only remaining blocker is the required human approval (branch protection needs 1 approving review) — nothing further for me to fix. Continuing to monitor for new feedback.

@builder-io-integration

Copy link
Copy Markdown
Contributor

There was a problem with your request, please try again later. Error id: 6100e553bf914f25846699ede98c73fe

@builder-io-integration

Copy link
Copy Markdown
Contributor

Final status after 20+ min of monitoring with no new feedback:

  • Rebased onto latest main as requested (d1ee630) — clean rebase, no conflicts.
  • All CI checks are now green, including the two that were previously failing (Fast tests and Generate + run standalone Chat) — the rebase resolved both.
  • Automated Review Agent re-reviewed twice post-rebase: looks good ✅, Risk: Low, no actionable findings either time.
  • No inline review comments or human review threads to address.
  • MERGEABLE, no merge conflicts.
  • Remaining blocker: branch protection requires 1 human approving review — not something I can do. Otherwise this PR is ready to merge.

Stopping the monitoring loop here.

@SajalChaplot
SajalChaplot requested review from a team and teleaziz and removed request for a team July 24, 2026 11:05
@SajalChaplot

Copy link
Copy Markdown
Contributor Author

@builderio-bot look at latest PR feedback and fix anything you agree with. Be skeptical. Reply to every comment (directly on the comment thread of each comment) if you fixed it or not and why. then check back every 2 minutes on a loop and see if any new feedback posted, until at least 20 minutes go by without any new feedback posted we want to address, including making sure CI passes too and no merge conflicts (make sure code is mergeable)

SajalChaplot and others added 4 commits July 24, 2026 11:15
Preview container now uses a viewport-relative height (60vh capped at 30rem) instead of growing unconstrained with image content.
Surfaces the asset detail link in the candidates header alongside Save/Add to References/Dismiss actions. Also removes the now-unused CandidateStatusPill component.
…tes header

Reconciles with the AssetPreviewDialog introduced in #2296 so the
header's Open details action opens the inline dialog when available,
matching the click-through behavior already used on the image and
elsewhere in the file.
@builder-io-integration

Copy link
Copy Markdown
Contributor

Checked latest PR feedback: no new inline review comments or human review threads (only the trigger comment).

Found and fixed a real merge conflict: since the last rebase, PR #2296 ("Unify asset preview dialog with details panel and navigation") merged into main and touched the same section of LiveCandidatesStage in brand-kits.$id.tsx — it added an inline AssetPreviewDialog with onOpen handlers to the (now-replaced) two-column layout. This made the branch CONFLICTING.

Rebased onto latest main again and manually resolved the conflict by combining both changes:

  • Kept this PR's full-width min(60vh,30rem) preview layout (no two-column grid/aside).
  • Preserved Unify asset preview dialog with details panel and navigation #2296's onOpen dialog-trigger support — clicking the preview image or the header's "Open details" button now opens the inline AssetPreviewDialog when available, falling back to href navigation otherwise (matches the pattern used elsewhere in the file for consistency).
  • Verified with pnpm run fmt:check and pnpm --filter assets typecheck — both pass.

Pushed as cab4f79. PR is now MERGEABLE again with no conflicts. Re-running CI now; will keep monitoring every ~2 minutes for new feedback and CI results until 20 minutes pass with nothing new.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder reviewed your changes — looks good ✅

Review Details

Code Review Summary

The latest PR state adds the onOpen/href preview behavior back into the refactored candidates panel and places LiveCandidatesActions alongside the per-candidate header actions. The full-width preview remains bounded by min(60vh, 30rem), thumbnails remain below it with horizontal overflow, and the old desktop two-column grid/sidebar has been removed consistently. The current call sites provide the reference-action handler, and the preview open behavior preserves dialog priority when onOpen is available with link fallback otherwise.

Parallel incremental reviews found no confirmed new, actionable regressions. One agent again noted the optional callback type, but there is no current missing-handler call site, so it is not a reportable runtime issue for this PR.

Risk: Low — UI layout and interaction presentation only; no API, persistence, or schema changes.

✅ Good patterns: preserved dialog-vs-navigation behavior, responsive header wrapping, bounded preview sizing, and retained thumbnail switching semantics.

🧪 Browser testing: Attempted but blocked by infrastructure — browser executors lacked navigation/click/screenshot tools, and the dev server's asset action routes returned NitroVite 500 errors during setup. No app failure was inferred from those environment issues.

@builder-io-integration

Copy link
Copy Markdown
Contributor

CI is fully green after the conflict resolution. All required checks pass, and the automated Review Agent re-reviewed the merge resolution and reported looks good ✅ / Risk: Low — confirmed the onOpen/href preview behavior was correctly reconciled with the new full-width layout, no regressions found.

PR is MERGEABLE with no conflicts. Only remaining blocker is the required human approval. Continuing to monitor for new feedback.

@builder-io-integration

Copy link
Copy Markdown
Contributor

There was a problem with your request, please try again later. Error id: a93bc75e6cf540319129f14d9f1c5597

@SajalChaplot
SajalChaplot requested a review from steve8708 July 24, 2026 11:49
@builder-io-integration

Copy link
Copy Markdown
Contributor

Final status after 20+ min of monitoring with no new feedback:

  • Found and fixed a real merge conflict caused by PR Unify asset preview dialog with details panel and navigation #2296 (merged into main after our previous rebase) touching the same LiveCandidatesStage section. Rebased again and manually reconciled both changes — kept this PR's full-width preview layout while preserving Unify asset preview dialog with details panel and navigation #2296's AssetPreviewDialog/onOpen support, applied consistently to both the preview image and the header's "Open details" button. Pushed as cab4f79.
  • Verified with pnpm run fmt:check and pnpm --filter assets typecheck before pushing.
  • All required CI checks pass, including Fast tests, Generate + run standalone Chat, Build, Scaffold E2E, Lint & format.
  • Automated Review Agent re-reviewed the conflict resolution: looks good ✅, Risk: Low, no regressions found.
  • No inline review comments or human review threads to address.
  • MERGEABLE, no merge conflicts with main.
  • Remaining blocker: branch protection requires 1 human approving review — not something I can resolve myself. Otherwise ready to merge.

Stopping the monitoring loop 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.

3 participants