Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c82d691
initial setup
akashkahalkar Apr 12, 2026
8f5768f
added state flow collector
akashkahalkar Apr 12, 2026
e683d93
renamed pokemonDependecymanager
akashkahalkar Apr 12, 2026
db9ee78
added placeholder Views
akashkahalkar Apr 12, 2026
e56ea87
added imageLoader
akashkahalkar Apr 12, 2026
2cd0a2f
completed list view UI
akashkahalkar Apr 12, 2026
fdeb4e2
added search
akashkahalkar Apr 12, 2026
2da504e
added empty search component
akashkahalkar Apr 12, 2026
c396a59
integrated empty view component in the listView screen
akashkahalkar Apr 12, 2026
5d95e2a
added details view model
akashkahalkar Apr 12, 2026
7674b86
added viewmodel factory
akashkahalkar Apr 12, 2026
74cce6b
added dimension view component to show the height and width
akashkahalkar Apr 13, 2026
5eaed01
added details view components
akashkahalkar Apr 13, 2026
8c96696
added favourites functionality to detail view model
akashkahalkar Apr 13, 2026
d23fc7b
completed details view UI changes
akashkahalkar Apr 13, 2026
ff41e75
added pagination call to list view model
akashkahalkar Apr 13, 2026
39ff0de
updated stats view
akashkahalkar Apr 13, 2026
da1aabd
refactored detail view
akashkahalkar Apr 13, 2026
5183acd
added favorite view model
akashkahalkar Apr 13, 2026
1a999fc
added haptics manager
akashkahalkar Apr 13, 2026
03bdff2
added text formatter for title and id
akashkahalkar Apr 13, 2026
bdc5ad3
completed changes for favourites module
akashkahalkar Apr 13, 2026
8053006
UI improvements
akashkahalkar Apr 13, 2026
cf203d2
fixed clipping issue in ability section
akashkahalkar Apr 14, 2026
241b229
added AI logs
akashkahalkar Apr 14, 2026
1afcf14
used image loader in details view
akashkahalkar Apr 14, 2026
25eae53
Error handling in list view
akashkahalkar Apr 14, 2026
742835a
added swift lint to the project
akashkahalkar Apr 14, 2026
0398d33
fixed all the swift lint warnings using --fix flag
akashkahalkar Apr 14, 2026
658bab0
updated scheme
akashkahalkar Apr 14, 2026
e1ef541
Added unit tests
akashkahalkar Apr 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
249 changes: 249 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 92 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions iosApp/AI_PROMPTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

## AI Usage Log

### Prompt 1 — Architecture planning
> *"Design an iOS architecture that safely bridges KMP StateFlow to SwiftUI, resolves Koin DI from Swift without modifying the shared module, and supports list/detail/favourites screens."*

**Used:** Store pattern, `StateFlowCollector`, `AsyncStream` extension, `ViewModelFactory` + `EnvironmentKey` shape.
**Changed:** Replaced `DispatchQueue.main.async` with `await MainActor.run` throughout for structured concurrency consistency.

### Prompt 2 — Koin DI from Swift
> *"Koin's reified get<T>() doesn't work from Swift and I can't modify the shared module. How do I resolve PokemonRepository from the Koin container?"*

**Used:** `instanceRegistry.instances` iteration + `qualifiedName` match in `KoinDependencyManager`.
**Changed:** Added `fatalError` guards for clearer startup failure messages.

### Prompt 3 — StateFlow AsyncStream bridge
> *"Build a type-safe Swift AsyncStream wrapper around Kotlinx_coroutines_coreFlowCollector for use with for-await loops."*

**Used:** `StateFlowCollector` + `stream(of:)` extension directly.
**Changed:** Added `withExtendedLifetime(collector)` in `onTermination` to prevent premature ARC dealloc.

### Prompt 4 — Image caching
> *"Build a custom ObservableObject image loader with NSCache and retry logic, safe for @MainActor SwiftUI views."*

**Used:** `PokemonImageLoader` structure (cache lookup, retry loop, `URLSessionDataTask`).
**Changed:** Switched to `Task { @MainActor in }` for actor isolation; added `hasFailed` for placeholder rendering.

### Prompt 5 — Detail screen layout
> *"Build a SwiftUI detail screen with: Swift Charts stat bars, abilities grid"*

**Used:** Decomposed view structure (`PokemonHeaderView`, `PokemonStatsSectionView`, `PokemonAbilitiesSectionView`), pulsing circle animation.
**Changed:** Replaced `GeometryReader` header with `ZStack` + `HStack` overlay; switched abilities to `adaptive(minimum: 60)` grid for variable-length names. added a haptics feedback on favourites. minor UI tweaks to make it look good.

### Prompt 7 — TypeColors
> *"Map all 18 Pokémon types to SwiftUI Colors for type chips and background glows."*

**Used:** Type → colour dictionary directly.
**Changed:** Adjusted Fire and Ghost colours to work better on dark mode.
Loading