Repository navigation
feat(chat-appearance): enhance chat appearance customization options - #379
Conversation
- Introduced new properties for chat appearance, including background image selection and effect adjustments. - Implemented bounding and restoration logic for brightness, blur, and opacity settings. - Added tests to validate new appearance features and ensure defaults are applied correctly. - Updated UI components to support background image selection and effect settings in the chat appearance picker.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
|
Caution Review failedThe pull request is closed. WalkthroughChat appearance now supports selectable background images, ASCII or image rendering, and configurable visual adjustments. The settings and home views pass these choices to the background renderer. ChangesBackground Appearance
Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant User
participant AppearanceSection
participant AsciiBackground
User->>AppearanceSection: Select image, effect, or adjustment
AppearanceSection->>AsciiBackground: Pass appearance and image
AsciiBackground->>AsciiBackground: Draw image or sampled glyphs
Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit picks a cloudy sky, |
Confidence Score: 4/5
[Medium impact] The PR changes appearance behavior in Nova’s new-thread workflow. The PR appears safe to merge, with non-blocking fixes recommended for short-window scrolling and text contrast over photos. Findings
|
| </button> | ||
| ))} | ||
| </div> | ||
| <fieldset className="mb-4"><legend className="mb-2 text-xs text-muted-foreground">Background image</legend><div className="grid grid-cols-2 gap-2">{([{ id: "night", label: "Night sky", src: "/nova/ascii-night.webp" }, { id: "clouds", label: "Clouds", src: "/cloudy.png" }] as const).map((item) => <button key={item.id} type="button" aria-pressed={(appearance.image ?? "night") === item.id} onClick={() => onChange({ ...appearance, image: item.id })} className="overflow-hidden rounded-lg border border-white/10 text-left text-xs text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white aria-pressed:ring-2 aria-pressed:ring-white/60"><span aria-hidden="true" className="block h-16 bg-cover bg-center" style={{ backgroundImage: `url(${item.src})` }} /><span className="block px-2 py-1.5">{item.label}</span></button>)}</div></fieldset> |
There was a problem hiding this comment.
Picker controls leave the screen
The new image section makes the appearance picker too tall for short browser windows. PopoverContent has a height cap but no scrolling; the shared overflow-y: auto rule applies only to dropdown menus. The bottom color and automatic-contrast controls can extend off-screen. Add overflow-y-auto to the picker so those controls remain reachable.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| if (appearance?.effect === "image") { | ||
| const scale = Math.max(width / source.naturalWidth, height / source.naturalHeight) | ||
| const imageWidth = source.naturalWidth * scale | ||
| const imageHeight = source.naturalHeight * scale | ||
| context.clearRect(0, 0, width, height) | ||
| context.drawImage(source, (width - imageWidth) / 2, (height - imageHeight) / 2, imageWidth, imageHeight) |
There was a problem hiding this comment.
Automatic text blends into photos
Automatic text contrast still uses only appearance.background, but Original image covers that color at full opacity by default. The heading and project controls have no solid backing. For example, Paper keeps black text even when the brightness slider darkens the photo behind it. Add a contrast-preserving backing for this text, or account for the displayed image when choosing its automatic color.
Description
Please include a summary of the change and which issue is fixed.
Fixes #(issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
bun testpassesbun run typecheckpassesbun run lintpasses (if applicable)Checklist:
Summary by CodeRabbit