mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
Audit pass that verified every concrete claim in .claude/ against the
repository:
- account-state: Account.kt no longer exposes followListFlow-style
StateFlows; document the state-object pattern (kind3FollowList,
muteList, bookmarkState, ... each exposing .flow) and rewrite the
catalog reference from the real Account.kt
- feed-patterns: filter bases (FeedFilter, AdditiveFeedFilter,
ChangesFlowFilter, FeedContentState) moved to commons/ui/feeds;
ui/dal keeps AdditiveComplexFeedFilter/FilterByListParams plus
back-compat typealiases; fix recipe example signatures
- relay-client: add nip17Dm/, eoseManagers and subscriptions entries
to the layout tree
- gradle-expert: 4-module claim -> 10 modules; refresh compose/kotlin/
BOM versions; rewrite dependency graph with verified edges for cli,
geode, quic, nestsClient, quic-interop, benchmark
- desktop-expert: drop drifted Main.kt line numbers; sidebar is the
custom MainSidebar in DeckSidebar.kt, not a NavigationRail in
SinglePaneLayout.kt
- android-expert: compileSdk/targetSdk 36 -> 37, versionName via
generateVersionName()
- kotlin-expert: remove reference to nonexistent commit 258c4e011
- CLAUDE.md: add missing geode/benchmark/quic-interop modules
- desktop-run: packageRpm + correct binaries output path; extract.md:
drop duplicated find clause
- session-start.sh: /home/user/Amber fallback was a copy-paste from
another repo; fall back to CLAUDE_PROJECT_DIR
https://claude.ai/code/session_01EC7LdXjatFTh1CJSP4qKRn
1.4 KiB
1.4 KiB
description
| description |
|---|
| Extract a composable from amethyst to shared code |
Extract the component $ARGUMENTS from the Android app to shared KMP code:
Process
-
Locate the component in the amethyst module:
find amethyst/src -name "*$ARGUMENTS*" grep -r "fun $ARGUMENTS\|class $ARGUMENTS" amethyst/src/ -
Analyze dependencies:
- Android-specific imports (Context, Intent, etc.)
- Platform APIs (Camera, MediaStore, etc.)
- Android Compose specifics vs standard Compose
-
Identify what can be shared:
- Pure Composable functions →
commons/commonMain/ - Business logic →
quartz/commonMain/ - Platform-specific → create expect/actual
- Pure Composable functions →
-
Create shared version:
- Move to appropriate shared module
- Replace Android imports with multiplatform alternatives
- Add expect declarations for platform-specific parts
-
Update references:
- Change imports in amethyst module
- Add implementations in desktopApp if needed
Common Replacements
| Android | Multiplatform |
|---|---|
LocalContext.current |
expect/actual or parameter |
stringResource() |
Res.string.* |
painterResource() |
painterResource(Res.drawable.*) |
Toast.makeText() |
Custom snackbar/notification |
Intent |
expect/actual for navigation |
Example
/extract NoteCard
This will find NoteCard, analyze its dependencies, and guide you through extracting it to shared code.