Skip to content

Add offline-mode protocol adapters, session manager, UI connect flow and launcher branding - #2

Merged
WieszczY85 merged 2 commits into
mainfrom
syntaxdevteam-improvements/sprawdz-dokumentacje-aplikacji
Sep 30, 2026
Merged

WieszczY85 merged 2 commits into
mainfrom
syntaxdevteam-improvements/sprawdz-dokumentacje-aplikacji

Conversation

@WieszczY85

Copy link
Copy Markdown
Member

Motivation

  • Implement a real (headless) networking prototype so the app can perform offline-mode Minecraft logins and basic session management instead of only using demo data.
  • Provide a clear domain-facing session contract and map protocol failures to safe UI-facing errors.
  • Expose a quick connect UI and integrate a branded launcher and logo assets for a presentable prototype.

Description

  • Add a packet-independent protocol boundary and typed session model by introducing MinecraftConnection (now returning ConnectedSession) and MinecraftConnectionException, plus SessionManager/SessionManagerFactory and domain models in domain/session.
  • Implement a concrete session manager DefaultSessionManager that serializes lifecycle operations, publishes StateFlow snapshots and emits SharedFlow events, and maps connection exceptions to SessionError.
  • Provide two offline-mode protocol adapters: protocol.modern.ModernOfflineMinecraftConnection (Minecraft Java 26.1 / protocol 775) and protocol.legacy.LegacyOfflineMinecraftConnection (protocol 47) with a shared ProtocolCodec for framing, varint/strings, and compression handling.
  • Wire the session system into UI: CraftConnectApp now accepts a SessionManagerFactory, ServersScreen shows an offline quick-connect dialog, and ChatScreen forwards send actions to the active session manager.
  • Add launcher/branding assets and theme entries (craftconnect_logo, adaptive ic_launcher/ic_launcher_round, colors and values-v31/themes.xml) and update BrandHeader to show the logo.
  • Update README.md and docs/ARCHITECTURE.md to document the protocol scope and session abstraction, and update Gradle libs and app/build.gradle.kts to add coroutine and test dependencies.

Testing

  • Added unit and integration-style tests and executed them: ProtocolCodecTest, LegacyOfflineMinecraftConnectionTest, ModernOfflineMinecraftConnectionTest, and DefaultSessionManagerTest.
  • All added tests ran as part of the Gradle test suite and passed.
  • Verified Gradle build with ./gradlew :app:assembleDebug after dependency updates and resource additions.

Codex Task

@WieszczY85
WieszczY85 merged commit 76694f3 into main Sep 30, 2026
1 check passed
@WieszczY85
WieszczY85 deleted the syntaxdevteam-improvements/sprawdz-dokumentacje-aplikacji branch September 30, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant