Conversation
Introduce the de.pyryco.mobile.data.model package with Conversation, Session, Message and the Role enum, plus paired equality / hashCode / copy unit tests. Wires kotlinx-datetime 0.6.2 through the version catalog so the data layer stays portable for a possible Compose Multiplatform walk-back. Closes #2 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
Code Review: #2Decision: PASS FindingsNo MUST FIX, SHOULD FIX, or NIT findings. Verified against the spec at
Local verification: SummaryTextbook spec-following implementation of foundational data types. No consumers yet, so blast-radius is nil. Ready to merge; the next ticket ( |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Creates the
de.pyryco.mobile.data.modelpackage with three foundational data classes and one enum:Conversation— id, optional name, cwd, current session, session history,isPromotedflag,lastUsedAttimestampSession— id, conversationId, claudeSessionUuid, started/ended timestampsMessage— id, sessionId, role, content, timestamp, isStreamingRole { User, Assistant, Tool }co-located inMessage.ktWires
kotlinx-datetime 0.6.2via the version catalog (libs.kotlinx.datetime) so timestamps stay portable for a possible Compose Multiplatform walk-back —java.time.Instantwould have locked the data layer to JVM/Android.No
ConversationRepositoryyet (next ticket), no persistence, no serialization annotations.Issue
Closes #2
Testing
app/src/test/java/de/pyryco/mobile/data/model/— one per data class.data classtest assertsequals,hashCode,copy(...)overrides one field while preserving the rest, andcopy()returns a new instance.MessageTestadditionally assertsRole.entriesis exactly[User, Assistant, Tool]in declaration order../gradlew test— passes../gradlew lint— passes../gradlew assembleDebug— passes../gradlew connectedAndroidTest— not run; no device connected and this ticket has no instrumented tests.Architecture compliance
Roleco-located inMessage.kt(tightly bound, three-line enum, no independent consumers).kotlinx.datetime.Instantused throughout the data layer (CLAUDE.md "Don't" — keepdata/portable). Nojava.time.Instantimport anywhere.gradle/libs.versions.tomland pulled intoapp/build.gradle.ktsvialibs.kotlinx.datetime. No raw coordinate in the build file.require(...)/init { }blocks — scope is the schema only.🤖 Generated with Claude Code