-
Notifications
You must be signed in to change notification settings - Fork 374
Copy startup terminal #5585
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
Copy startup terminal #5585
Conversation
🎭 Playwright Test Results✅ All tests passed! ⏰ Completed at: 09/15/2025, 11:45:32 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Note: Based on #5563, which should be merged first |
fefb822
to
2ba4060
Compare
N.B. This also affects web frontend - in the logs drawer. First screenshot is Chrome. PR says "terminal" mostly because it's |
emit('created', terminalData, rootEl) | ||
const { terminal } = terminalData | ||
let selectionDisposable: IDisposable | undefined |
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.
I usually see mutable variables like this as a red flag. Should this be a ref?
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.
I always check let
usage, because it's usually not what I want. This, afaik, has always been the frontend pattern for this type of value.
Is there any actual benefit to having this be a ref? Seems like it would just add needless overhead for what this is actually used for?
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.
One benefit would be fewer let
s 😁
It would also let you more safely reference and reset the value in the lifecycle hooks.
}) | ||
onUnmounted(() => { | ||
selectionDisposable?.dispose() |
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.
If you change selectionDisposable to be a ref, you can also use https://vueuse.org/shared/refManualReset/ to prevent double disposals
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.
Unless I'm missing the point, this one feels like attempting to guard against internal Vue failures. My gut reaction is that we should trust the framework to honour its lifecycle. If our framework lifecycle is broken, the app really should just stop executing.
})) | ||
})) | ||
|
||
const mockTerminal = { |
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.
Is there an interface you can declare that this satisfies
?
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.
Also, could you move this into the mock as a cached value to prevent direct access?
tests-ui/tests/components/bottomPanel/tabs/terminal/BaseTerminal.spec.ts
Outdated
Show resolved
Hide resolved
tests-ui/tests/components/bottomPanel/tabs/terminal/BaseTerminal.spec.ts
Outdated
Show resolved
Hide resolved
tests-ui/tests/components/bottomPanel/tabs/terminal/BaseTerminal.spec.ts
Outdated
Show resolved
Hide resolved
tests-ui/tests/components/bottomPanel/tabs/terminal/BaseTerminal.spec.ts
Outdated
Show resolved
Hide resolved
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
}) | ||
const handleCopy = async () => { | ||
const { terminal } = terminalData |
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.
Isn't this already present in scope?
…al.spec.ts Co-authored-by: Alexander Brown <[email protected]>
Add assertion to verify onSelectionChange was called
- Current consensus is .test.ts for component files
6a4316e
to
c0f07b6
Compare
57a0f23
to
2c26e83
Compare
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
Summary
Adds hover-based copy button to Logs pane, Desktop terminal, and Desktop start view, with smart selection handling.
Changes
Screenshots
Top right -->
Desktop server start view
┆Issue is synchronized with this Notion page by Unito