create agent#6520
Conversation
| onChange({ | ||
| ...value, | ||
| backgroundColor: preset.color, | ||
| bodyTextColor: preset.textColor, | ||
| // Clear accent if the dark/light mode changes so we don't end up with | ||
| // a dark accent on a dark background or vice versa. | ||
| primaryColor: undefined, |
There was a problem hiding this comment.
selectBackground always sets primaryColor to undefined, contradicting the comment that this should happen only when dark/light mode changes.
Show fix
| onChange({ | |
| ...value, | |
| backgroundColor: preset.color, | |
| bodyTextColor: preset.textColor, | |
| // Clear accent if the dark/light mode changes so we don't end up with | |
| // a dark accent on a dark background or vice versa. | |
| primaryColor: undefined, | |
| const newIsDark = DARK_BACKGROUNDS.some((p) => p.color === preset.color); | |
| const modeChanged = isDark !== newIsDark; | |
| onChange({ | |
| ...value, | |
| backgroundColor: preset.color, | |
| bodyTextColor: preset.textColor, | |
| // Clear accent if the dark/light mode changes so we don't end up with | |
| // a dark accent on a dark background or vice versa. | |
| primaryColor: modeChanged ? undefined : value.primaryColor, |
Details
✨ AI Reasoning
The selection flow is meant to preserve accent color unless a mode switch makes it incompatible. However, the background selection handler always clears the accent, regardless of whether the new background keeps the same mode category. This creates behavior that contradicts the stated assumption and can discard valid user choices unexpectedly.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
jbrunton96
left a comment
There was a problem hiding this comment.
Really good start. Python structure looks sound and properly stateless which is fantastic
| Path parent = dir.getParent(); | ||
| if (parent == null) break; | ||
| dir = parent; | ||
| } |
There was a problem hiding this comment.
I'm not sure how safe this is. In the real deployment, it's likely that the backend and frontend are running on different machines, right? Is this path just for development? I can see supposed Docker paths below, which might handle the production case. Would it make sense to have a backend node_modules which just installs puppeteer locally for the backend and then ship that? Is there any existing Java code that runs things from the frontend? How does that work?
There was a problem hiding this comment.
Ah good shout. I’ll investigate and see what the best move is
| * - Please do NOT modify this file. | ||
| */ | ||
|
|
||
| const PACKAGE_VERSION = "2.14.6"; |
There was a problem hiding this comment.
I don't undestand why this is showing up in the diff because I fixed it in #6526. Hopefully it disappears on an update from main?
There was a problem hiding this comment.
Yeah I think I just need to merge main in :) I’ll see
🚀 V2 Auto-Deployment Complete!Your V2 PR with embedded architecture has been deployed! 🔗 Direct Test URL (non-SSL) http://54.175.155.236:6520 🔐 Secure HTTPS URL: https://6520.ssl.stirlingpdf.cloud This deployment will be automatically cleaned up when the PR is closed. 🔄 Auto-deployed for approved V2 contributors. |
Added the create agent. Use these prompts to test or try your own :)
Here’s the one I use