Repository navigation
Type live events in the domain; move UiText and SplitPanePreferences out of the wrong layer - #1012
Merged
Merged
Conversation
Feature code matched server event-name strings and read raw event properties itself. Add typed queries on OpencodeEvent in domain/event (worktree and branch updates, run end, reconnect, model catalog refresh, archive change, session error and user abort, title / revert / delete / move updates) and move the event names there. UI subscribers use the typed form, and SessionInfo / SessionChatViewModel no longer hold an EventDomainAdapter. The adapter keeps its query methods as delegates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Five domain files imported UiText from ui.text. The plain type and its lookup-based resolve move to domain.text; the Android Resources lookup and the Compose resolve() stay in ui.text (UiTextResources.kt). The serialization surrogates in TimelineText.kt carry explicit serial names, so navigation keys serialize exactly as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The store in domain/preferences depended on the design-system types OpenCodeSplitPaneScreen / State / Layout on both platforms. It now lives next to the component (Android ui/components/layout, package ui.components; iOS Components/Layout). Storage names, keys and values are unchanged. The screenshot module already compiles ui/components/layout, so its symlink to the old path is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 9, 2026
Merged
ivanfenenko
marked this pull request as ready for review
November 10, 2026 08:16
…dependencies downward (#1013) * Read tool input and metadata through typed domain accessors Timeline UI indexed a tool part's raw input / metadata JSON by wire key (per-tool chrome, step titles, background work, child session linking, the tool result sheet). Add ToolPartFields in domain/message on both platforms: per-meaning accessors (inputPattern, inputTargetPath, childSessionId, patchFiles, executeCallPreviews, questionAnswers, summaryCalls, resultFields, withChildSessionId, ...) that keep each surface's existing read rule. UI consumes them; the raw fields stay on the model, so the session cache and protocol adapters are untouched. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Point the display pipeline's dependencies down into the domain Android: DisplayMessagePipeline called the UI block builder to decide whether a message is one text block. PresentationBlockId and the default timeline's text-run segmentation (text runs, tool grouping, visibility and part-id rules) move to domain/message/pipeline as TimelineSegments; the UI builder maps segments to blocks and the pipeline counts text runs. A test checks the two agree. iOS: the Markdown document model (NativeMarkdownDocument and its block, inline, code-span and diff types), the variant/detector and the parser move from Components / UI to Domain/Markdown; the SwiftUI rendering stays in Components. The highlighter reaches DisplayMessagePipeline and MessageContentPreparer.shared through their initializers from AppContainer instead of the domain reading Container. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
The sync coordinator invalidated on both the stopped occupancy and the backgroundStop signal, which arrive on separate tasks. A late signal could invalidate after a foreground catch-up started and force a second reload, which made ProjectionReconciliationTests flaky on CI. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Layering refactor, part 1 of 2. No behaviour change, no UI change.
What moved and why
"worktree.updated","vcs.branch.updated","session.idle","session.error","session.archived"/"unarchived", catalog and reconnect sets) and AndroidSessionInforeadrawPropertiesto tell a user abort from a real error. Newdomain/event/OpencodeEventQueries(.kt/.swift) holds the event names and typed queries onOpencodeEvent:isWorktreeUpdated,isBranchUpdated,isSessionRunEnd,isMessagePartDelta,isStreamReconnect,triggersModelCatalogRefresh,sessionArchiveChange(SessionArchiveChange),triggersArchivedListRefresh,isUserAbortSessionError,sessionErrorMessage, and the title / revert / delete (and on iOS move) updates. Every UI subscriber uses them.SessionInfoandSessionChatViewModelno longer hold anEventDomainAdapteron either platform; the adapter keeps its query methods as one-line delegates so domain callers and adapter tests are unchanged. Emitted events, the v2→v1 projection and the Live Stores are untouched.UiTextmoves fromui.texttodomain.text(plain type,UiTextLookup, lookup-basedresolve). The Resources lookup and the Composeresolve()stay inui/text/UiTextResources.kt.TimelineText.ktsurrogates have explicit@SerialNames, so navigation keys serialize the same.SplitPanePreferencesmoves beside the split-pane component on both platforms (Androidui/components/layout, packageui.components; iOSComponents/Layout), removing the domain → design-system dependency. Storage names, keys and values are unchanged. The screenshot module already compilesui/components/layoutviasrcDir, so its symlink to the old path is removed.After this PR,
grep -rn "^import dev.opencode.mobile.ui" android/app/src/main/java/dev/opencode/mobile/domainlists only the threeDisplayMessagePipeline.ktimports that part 2 removes, and no non-playground file underui//UI/holds a server event-name literal or touchesrawProperties.Checks
android/:./gradlew :app:assembleDebug :app:compileDebugAndroidTestKotlin :app:testDebugUnitTest --continue→ BUILD SUCCESSFUL; 3507 unit tests, 0 failures, 1 skipped.xcodebuild build-for-testingDebug andxcodebuild buildRelease forgeneric/platform=iOS Simulator→ succeeded.xcodebuild test -only-testing:"OpenCode MobileTests"on a dedicated simulator → 3474 tests in 334 suites passed.gitleaks git --pre-commit --stagedbefore each commit: no leaks.Risks / Follow-ups
android/screenshot(-PincludeScreenshot=true :screenshot:compileDebugKotlin, JDK 26) does not compile on this branch or onorigin/main(438 identical errors, mostly unresolvedRandThemeManager'sUiText). Pre-existing and not in CI; not fixed here.sessionErrorMessage()skips blank candidates while iOS skips empty ones; iOSsessionMovedreads the v2 move projected ontosession.updated, Android keeps its existingsessionMoved()onsession.moved. Kotlin exposes parsed updates as functions (event.sessionTitleUpdate()), Swift as properties, matching each platform's existing style.isStreamReconnectis only used throughtriggersModelCatalogRefreshthere.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.