Files
amethyst/commonsUI
Claude 417f4060a7 fix: second audit of the commonsUI move - PDF snapshot close off main, shared formatters, tests
- PdfPreviewCard closed its cache snapshot on the main thread (the use{}
  ran after withContext(IO) returned), taking Coil's global DiskLruCache
  lock there; pre-existing. PdfFetcher.useSnapshot fetches, runs the block
  and closes inside one IO block, with no suspension point for cancellation
  to leak through. The PDF viewer's onDispose closes its handle on the app IO
  scope, under the render mutex.
- JVM and iOS built a time-of-day formatter per feed item; they share one
  cached instance now (NSDateFormatter is costly to build).
- timeAgoShort no longer allocates an unused fallback lambda per tick on
  Android: the expect returns null where the platform has no short span.
- The iOS skeleton formatter keys on the locale only, like Android: iOS
  caches its system zone until reset, so keying on it cost lookups and never
  saw a change. KDocs now say which platforms follow what.
- JumboEmojiTest covers emoji counting (ZWJ, skin tone, flag, keycap) and the
  bubble shapes; ScreenLayoutTest moves to commonsUI jvmTest beside its code.
- The plan records the audit, and that the packaged Desktop runtime lacks
  jdk.localedata, which these formatters need before Desktop uses them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjQQN9CgWHVtNCSWqnKoqY
2026-09-26 23:40:07 +00:00
..