Clean up the app: one fix per rule already written down somewhere else
A pass over every Kotlin file, fixing each place a rule the codebase had already learned was applied to only one member of its set: - Notifications: checkSelfPermission(POST_NOTIFICATIONS) on Android 12 and below answers "denied" for a permission that does not exist there, so every notification on API 24-32 was silently dropped. Version-guarded; before 13 the app-level switch is the whole answer. - The permission-mode list was written three times and had drifted: the import screen was missing "plan". One list in Api.kt now. - The import screen's delete refetched the whole list through a loading spinner -- the exact fault the session list's delete already fixed and documented. It now removes only the deleted row. - The import screen truncated paths at a hardcoded 40 characters; it now uses StartEllipsis against the row's real width, like the models screen. - warm() bypassed the partsOf cache built for it, re-scanning every loaded message per page, and warmed a multi-block memory note under keys no row looks up. It now mirrors transcriptUnits through the same caches. - The transcript's data model (TranscriptItem, foldEvent, joinPages, warm) moved out of SessionScreen.kt into TranscriptItems.kt: pure folding with no screen in it, changing for unrelated reasons in the same file. - One image fetch/decode/failed block was written twice; it is rememberSessionBitmap in SessionImage.kt now. - Lint is fully clean: android.media.ExifInterface replaced with the androidx one (the framework copy lacks the hostile-image parsing fixes, and these images arrive from outside the phone), highlights bumped to 1.1.0, and the notification fix above closed InlinedApi. - Dead weight out: an unused act() onFailure parameter, and five orphaned or misattached doc comments (UserBubble carried SessionImage's doc). Verified: ktfmt, compileDebugKotlin, lintDebug (0 issues), server suite (93 passed), clippy and rustfmt clean; exercised on the emulator against a real imported transcript -- paging, tool groups, block rendering, no crashes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a63ae8347f
commit
d07325401d
17 files changed
+547
-525
No files matched your search
@@ -28,8 +28,13 @@ zxing-embedded = "4.3.0"
|
||||
markdown-renderer = "0.45.0"
|
||||
# Syntax highlighting for a tool call's input. Same reasoning as the markdown
|
||||
# renderer: a language's lexical rules are somebody else's specification.
|
||||
# Latest stable, checked 2026-08-29 against Maven Central.
|
||||
highlights = "1.0.0"
|
||||
# Latest stable, checked 2026-08-31 against Maven Central.
|
||||
highlights = "1.1.0"
|
||||
# The support ExifInterface rather than android.media's, which lint warns off:
|
||||
# the framework one is missing formats and the fixes for parsing hostile
|
||||
# images, and images here arrive from outside the phone. Latest stable,
|
||||
# checked 2026-08-31 against Google Maven.
|
||||
androidx-exifinterface = "1.4.2"
|
||||
# Declared rather than inherited for the same reason as core-ktx: SessionScreen
|
||||
# now calls repeatOnLifecycle/LocalLifecycleOwner directly, to hold the event
|
||||
# stream open only while the screen is on screen. Latest stable, checked
|
||||
@@ -59,6 +64,7 @@ desugar-jdk-libs = { module = "com.android.tools:desugar_jdk_libs", version.ref
|
||||
# theme, so the app's Catppuccin scheme is what it draws with.
|
||||
markdown-renderer = { module = "com.mikepenz:multiplatform-markdown-renderer-m3", version.ref = "markdown-renderer" }
|
||||
highlights = { module = "dev.snipme:highlights", version.ref = "highlights" }
|
||||
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version.ref = "androidx-exifinterface" }
|
||||
# Declared directly rather than through the plugin's `compose.*` accessors,
|
||||
# which are deprecated as of CMP 1.11.
|
||||
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose-multiplatform" }
|
||||
|
||||
Reference in new issue
Block a user