b95135eb3b
Tasks 1.1–3.3 of docs/plans/2026-05-17-tui-refactor.md:
- Mosaic 0.13 → 0.18; Kotlin 2.0.21 → 2.2.10 (required by Mosaic).
Fix MaxLineLength regressions in core/kernel orchestration logs.
- Input: drop raw System.in reader and ANSI escape parser. Wire
Modifier.onKeyEvent at root; MosaicKeyMapper → KeyResolver → Action.
- State: split TuiState into Connection/Sessions/Input/Approval/Provider
slices. Add InputMode.SteeringNote; delete handleSteer/System.console.
- Reducers: pure RootReducer composes slice reducers returning
(state, List<Effect>). Effect is sealed (SendWs, Quit). Single
dispatch(action) point in TuiApp; one coroutine drains effects.
- TuiWsClient now exposes messages/connection SharedFlows; suspend
callbacks gone. ConnectionEvent sealed type added.
- Rendering: Panel(title){…} composable with LocalTerminalSize
composition local; drop BOX_WIDTH and hand-padding from every
component. Poll stty size every 500ms.
- Tests: KeyResolver (18) + 5 reducer suites (37). 55 total in :apps:tui.
Pending tasks 4.1–5.2 tracked in
docs/plans/2026-05-17-tui-refactor.progress.md.
43 lines
1.6 KiB
Groovy
43 lines
1.6 KiB
Groovy
plugins {
|
|
id 'org.jetbrains.kotlin.jvm'
|
|
id 'org.jetbrains.kotlin.plugin.serialization'
|
|
id 'org.jetbrains.kotlin.plugin.compose'
|
|
id 'application'
|
|
}
|
|
|
|
application {
|
|
mainClass = 'com.correx.apps.tui.MainKt'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':apps:server')
|
|
implementation project(':core:events')
|
|
implementation project(':core:approvals')
|
|
|
|
implementation "io.ktor:ktor-client-core:$ktor_version"
|
|
implementation "io.ktor:ktor-client-cio:$ktor_version"
|
|
implementation "io.ktor:ktor-client-websockets:$ktor_version"
|
|
implementation "io.ktor:ktor-client-logging:$ktor_version"
|
|
|
|
implementation "com.jakewharton.mosaic:mosaic-runtime:0.18.0"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinx_serialization_version"
|
|
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test"
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test-junit5"
|
|
testImplementation "org.junit.jupiter:junit-jupiter:5.10.2"
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.2"
|
|
}
|
|
|
|
tasks.named('test') { useJUnitPlatform() }
|
|
|
|
tasks.withType(Tar).configureEach { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
|
|
tasks.withType(Zip).configureEach { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
|
|
tasks.named("installDist") { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
|
|
|
|
configurations.configureEach {
|
|
resolutionStrategy.force(
|
|
"com.github.ajalt.mordant:mordant:2.6.0",
|
|
"com.github.ajalt.mordant:mordant-jvm:2.6.0"
|
|
)
|
|
} |