Skip to content

fix(sync-button): prevent time-ago casing flicker#12373

Merged
PavelLaptev merged 1 commit intomasterfrom
feat/timeago-capitalize-flicker
Feb 16, 2026
Merged

fix(sync-button): prevent time-ago casing flicker#12373
PavelLaptev merged 1 commit intomasterfrom
feat/timeago-capitalize-flicker

Conversation

@PavelLaptev
Copy link
Contributor

@PavelLaptev PavelLaptev commented Feb 16, 2026

image image

Summary
This PR fixes a UI flicker where the sync timestamp briefly rendered in lowercase and then appeared capitalized.

Root Cause
The text from TimeAgo is lowercase by design, while SyncButton was applying capitalization via CSS (first-letter transform). During render/hydration updates, lowercase content could paint before the style transform became visible.

Copilot AI review requested due to automatic review settings February 16, 2026 15:24
@vercel
Copy link

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
gitbutler-web Ignored Ignored Preview Feb 16, 2026 3:36pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a UI flicker issue in the SyncButton component where the timestamp briefly appears in lowercase before being capitalized. The root cause was CSS-based capitalization (::first-letter transform) which can render after the initial paint during hydration, causing a visible flash.

Changes:

  • Added an optional capitalize prop to the TimeAgo component with string-level capitalization logic
  • Updated SyncButton to use the new capitalize prop instead of CSS-based capitalization

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/ui/src/lib/components/TimeAgo.svelte Added optional capitalize prop and formatText function to handle string-level capitalization
apps/desktop/src/components/SyncButton.svelte Removed CSS capitalize class and passed capitalize={true} to TimeAgo component

@PavelLaptev PavelLaptev enabled auto-merge (squash) February 16, 2026 15:31
@PavelLaptev PavelLaptev disabled auto-merge February 16, 2026 15:31
@PavelLaptev PavelLaptev force-pushed the feat/timeago-capitalize-flicker branch from b87c1ab to c0dd295 Compare February 16, 2026 15:33
@PavelLaptev PavelLaptev force-pushed the feat/timeago-capitalize-flicker branch from c0dd295 to 6787a25 Compare February 16, 2026 15:36
@PavelLaptev PavelLaptev merged commit ea423fe into master Feb 16, 2026
28 checks passed
@PavelLaptev PavelLaptev deleted the feat/timeago-capitalize-flicker branch February 16, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant