-
Notifications
You must be signed in to change notification settings - Fork 1.2k
layout fixes 1 #3341
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
layout fixes 1 #3341
Conversation
…src/' https://linear.app/skyvern/issue/SKY-6148/enpal-unable-to-minimize-screen <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Add window resize handling for NoVNC canvas in `BrowserStream` and adjust layout in `Workspace`. > > - **Behavior**: > - Add `resizeTrigger` prop to `BrowserStream` to handle window resize events for NoVNC canvas. > - Introduce `windowResizeTrigger` state in `Workspace` to trigger NoVNC canvas resize on window resize. > - **Layout**: > - Adjust `skyvern-split-left` and `skyvern-split-right` classes in `Workspace` for consistent width and positioning. > - Add `z-20` to sub-panel positioning in `Workspace` for proper layering. > - **Misc**: > - Add window resize event listener in `Workspace` to update `windowResizeTrigger`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for d318fb3298cb34484301c1b26975ba168334b035. You can [customize](https://app.ellipsis.dev/Skyvern-AI/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
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.
Caution
Changes requested ❌
Reviewed everything up to 11347e4 in 2 minutes and 34 seconds. Click for details.
- Reviewed
164
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
3
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. skyvern-frontend/src/components/BrowserStream.tsx:298
- Draft comment:
Using '!resizeTrigger' may prevent the effect from running when the value is 0. Ensure that 0 is not a valid trigger value or check explicitly for undefined. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The comment raises a valid point - using ! operator would treat 0 as falsy. However, looking at the context, resizeTrigger appears to be used as a trigger counter that gets incremented (like vncDisconnectedTrigger), not a meaningful numeric value. A value of 0 would indicate no trigger has happened yet, which is effectively the same as undefined for this use case. The suggested change would not meaningfully improve the code. I could be wrong about how resizeTrigger is used - maybe 0 is a valid trigger value that should trigger a resize. The type definition alone doesn't tell us the full intent. Even if 0 was meant to be a valid trigger value, the current commented-out implementation suggests this is experimental/WIP code that isn't fully implemented yet. Being overly precise about edge cases seems premature. The comment raises a technically correct but practically unimportant edge case. Given the experimental nature of this code, this level of precision is unnecessary.
2. skyvern-frontend/src/routes/workflows/editor/Workspace.tsx:752
- Draft comment:
The calc expression in the className (w-[calc(100%-33rem)]) may require spaces (e.g. 'calc(100% - 33rem)') for reliable CSS parsing. Please verify. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. skyvern-frontend/src/routes/workflows/editor/Workspace.tsx:846
- Draft comment:
The updated class adds 'hidden' to the timeline container. Confirm that completely hiding the element (instead of using 'invisible') is the intended behavior. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_tj1uF3YVVdbv7tHN
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
return; | ||
} | ||
|
||
// const originalDisplay = canvasContainer.style.display; |
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.
The resize trigger effect is currently commented out. Either remove the commented code or re-enable it if a canvas resize is needed.
{!showBrowser && workflowPanelState.active && ( | ||
<div | ||
className={cn( | ||
"pointer-events-none absolute right-6 top-[5rem] z-20", |
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.
The new panel block sets a top offset both via class ('top-[5rem]') and via inline style ('top: 8.5rem'). Please reconcile these values to avoid potential layout confusion.
"pointer-events-none absolute right-6 top-[5rem] z-20", | |
"pointer-events-none absolute right-6 z-20", |
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.
Important
Looks good to me! 👍
Reviewed 11347e4 in 3 minutes and 16 seconds. Click for details.
- Reviewed
164
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
5
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. skyvern-frontend/src/components/BrowserStream.tsx:297
- Draft comment:
The resize trigger effect is currently a no‐op since its body is commented out. Confirm whether this logic should be enabled or removed. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The commented code appears to be a work in progress or temporarily disabled feature for handling canvas resizing. The PR has explicitly added both the resizeTrigger prop and this effect, suggesting this is an intentional WIP state. The author likely knows the code is commented out since they just added it. Asking for confirmation doesn't add value - the author can uncomment or remove it when ready. The code could represent a bug where the author forgot to uncomment the implementation. Having a no-op effect in the codebase could be confusing for future developers. The code was just added in this PR along with its prop, so this is clearly intentional by the author. If it was accidentally committed commented out, it would be caught in testing since the resize functionality wouldn't work. The comment should be deleted. Asking the author to confirm their intention with commented code they just wrote doesn't add value. The author can uncomment or remove the code when they're ready to implement the resize functionality.
2. skyvern-frontend/src/routes/workflows/editor/Workspace.tsx:755
- Draft comment:
Consider using proper CSS calc syntax with spaces (e.g. 'calc(100% - 33rem)') instead of 'calc(100%-33rem)' for better cross‐browser compatibility. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While technically correct that calc() expressions should have spaces around operators for maximum compatibility, this is being used in a Tailwind CSS class where the calc() is wrapped in square brackets. The Tailwind processor will handle this correctly regardless of spacing. Additionally, there's inconsistent usage in the same file, suggesting this isn't a critical standard in this codebase. The comment is technically accurate about CSS best practices. Consistent spacing could make the code more maintainable and prevent potential edge case issues. However, in the context of Tailwind CSS classes, this is an overly pedantic suggestion that doesn't materially impact functionality. The Tailwind processor handles both formats correctly. Delete this comment as it's too minor of a suggestion for a PR review, especially given the inconsistent usage elsewhere in the codebase.
3. skyvern-frontend/src/routes/workflows/editor/Workspace.tsx:917
- Draft comment:
A new block rendering workflow panels for non‐browser mode has been added. Verify that this does not duplicate or conflict with any other panel rendering logic. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify that the new block rendering workflow does not duplicate or conflict with existing logic. This falls under asking the author to double-check things, which is against the rules.
4. skyvern-frontend/src/routes/workflows/editor/Workspace.tsx:734
- Draft comment:
The left panel now forces a fixed width and minimum width. Please test these values across various screen sizes to ensure responsiveness. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
5. skyvern-frontend/src/routes/workflows/editor/Workspace.tsx:935
- Draft comment:
Typo suggestion: Consider renaming 'setOpenConfirmCacheKeyValueDeleteDialogue' to use 'Dialog' instead of 'Dialogue' for consistency with common UI naming conventions. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While this is technically a valid suggestion since 'Dialog' is the more common spelling in UI components (and is used in the imported Dialog component), this kind of minor spelling variation doesn't impact functionality. The comment is about code style rather than a real issue. Additionally, variable renames would be caught by linting or code review processes. The spelling consistency argument has some merit since it matches the imported component name. This could reduce confusion for future developers. However, this is exactly the kind of minor, non-critical feedback that clutters PR reviews. The current spelling works fine and doesn't cause any technical issues. Delete this comment as it's too minor and doesn't highlight a significant issue that needs fixing.
Workflow ID: wflow_uM6qJmKGcVP3NNQZ
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
https://linear.app/skyvern/issue/SKY-6148/enpal-unable-to-minimize-screen
Important
Fixes layout issue by adding window resize handling for NoVNC canvas in
BrowserStream
andWorkspace
.resizeTrigger
prop toBrowserStream
to handle NoVNC canvas resizing on window resize.windowResizeTrigger
state inWorkspace
to trigger NoVNC canvas resize on window resize.useEffect
inBrowserStream.tsx
to handleresizeTrigger
changes.useEffect
inWorkspace.tsx
to updatewindowResizeTrigger
on window resize.Workspace.tsx
forskyvern-split-left
andskyvern-split-right
to ensure minimum width and proper layout.This description was created by
for 11347e4. You can customize this summary. It will automatically update as commits are pushed.
🔧 This PR implements layout fixes for the workflow editor, specifically addressing window resize handling for NoVNC canvas and improving panel positioning and layout consistency in the workspace interface.
🔍 Detailed Analysis
Key Changes
resizeTrigger
prop to handle window resize events for NoVNC canvas, with a placeholder useEffect for future resize logic implementationw-[33rem] min-w-[33rem]
for left panel,w-[calc(100%-33rem)]
for right panel) and improved z-index layeringz-20
) and added conditional rendering for panels when browser view is hiddenTechnical Implementation
Impact
Created with Palmier