Skip to content

fix: keep relative timestamps on just now for the first minute - #3364

Draft
Astro-Han wants to merge 1 commit into
mainfrom
fix/relative-time-just-now
Draft

fix: keep relative timestamps on just now for the first minute#3364
Astro-Han wants to merge 1 commit into
mainfrom
fix/relative-time-just-now

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Relative-time suffixes under one minute were counting seconds (1秒钟前, 2秒钟前, …), which made sidebar task rows and other RelativeTime surfaces flicker. Keep a single just-now label (刚刚 / just now) for the whole first minute, then switch to minute buckets, and delay the ticker until that boundary.

Verification

  • packages/core build + node --test dist/__tests__/relative-time.test.js (pass)
  • biome format / biome lint on the touched files (pass)
  • Did not run repository-wide tests; leave full coverage to CI

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope:

Maka implemented the formatter/ticker change, tests, and this PR.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Sidebar and other RelativeTime rows were counting seconds under one
minute, which made the suffix flicker. Hold a single just-now label
until the minute boundary, and only refresh then.

Generated-by: Maka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant