Releases: fangzx2001/OpencodeConnector4Android
Release list
OConnector v1.4.0
What's New in v1.4.0
Added
- Unified chat settings dialog — the middle piano key in the chat input bar is now a Settings button. Tapping it opens a dialog where you can configure Agent, Model, and Variant for the current session. Changes are committed on Confirm and reverted on Cancel (committed/draft separation). Selections are persisted per-session and restored on re-entry.
- Variant selection — choose a specific model variant (e.g. different quantization levels) when the server provides variants. The selected variant is sent in the prompt request so the server uses the exact configuration you picked.
- Provider/Model API — new GET /provider endpoint support with ProviderList, ProviderInfo, and ProviderModelInfo DTOs. Models are listed with their provider name, model name, and available variants.
- Selection persistence — Agent, Model, and Variant choices are saved per-session to ConnectionPreferences and automatically restored when re-entering a chat.
- Time-based session grouping — sessions are grouped by time: Today, Yesterday, This Week, Older. Sticky group headers with surfaceVariant background. Powered by SessionGrouper utility with relative time display.
- Relative time display — session timestamps show "just now", "5m ago", "2h ago" instead of absolute dates for recent sessions.
- Session search — search bar at the top of the project sessions screen with debounced filtering (300ms). Filters sessions by title.
- Active session status dots — green pulsing dot (StatusDot) indicates active/busy sessions. ActiveSessionStore tracks session status from SSE events.
- Project busy indicator — animated dot on project cards when any session within that project is actively running.
- Child session tree — expand/collapse child sessions under their parent session. Indented tree layout (24dp indent) with chevron toggle. ChildSessionStore manages parent-child relationships via GET /session/children API.
- Compact density mode — optional compact display density for the sessions list, persisted in ConnectionPreferences.
- Session summary stats — each session card shows quick stats: number of additions (+N), deletions (-N), and file changes (Ff) derived from tool calls.
- Agent load failure retry — when the agent list fails to load, a retry button appears in the chat screen instead of silently failing.
- New SSE event handlers — session.status and session.children events processed in ChatViewModel for real-time status and hierarchy updates.
- New MessagePart types — support for file, agent, snapshot, patch, retry, compaction, subtask part types (previously only text, tool-call, thinking).
- Session API endpoints — GET /session/status and GET /session/children for session status polling and child session discovery.
- session.deleted SSE handler — deleted sessions are immediately removed from the list without waiting for a manual refresh.
Changed
- Chat input bar middle key — changed from model name display to Settings trigger (icon). Tapping opens the unified settings dialog instead of a model dropdown.
- TopAppBar AgentPicker removed — the agent picker button previously in the top bar has been deleted. Agent selection is now exclusively in the Settings dialog.
- Deleted dead code — removed ModelSelector.kt, ContextUsageDisplay.kt, AgentPickerButton.kt, and showAgentPicker state — all superseded by the unified settings dialog.
- SessionInfo DTO expanded — added archived, partID, and SessionPermission pattern fields.
- SessionsScreen redesigned — full rewrite with time grouping, search, status dots, child trees, and summary stats. Now uses SessionsUiState with search/grouping/agentError fields.
- Removed eye button from chat top bar — child session visibility toggle moved to project session list.
- Updated availableModelsError state handling in ChatViewModel.
- Added diagnostic SSE event logging (SSE DIAG: prefix) for future debugging.
Fixed
- SSE generation mismatch (critical) — root cause of streaming not working. ChatViewModel.subscribeToEvents() read repository.currentGeneration which could be higher than the SSE service's actual generation (e.g. after network recovery callback incremented it). The strict gen < subscribedGeneration filter discarded ALL events including message.part.delta and session.idle. Text appeared all at once (via fallback polling) and spinner persisted until 120s watchdog timeout. Fix: adopt the service's generation when mismatch detected instead of discarding events.
- SseForegroundService null-intent recovery — when Android restarted the foreground service (e.g. after memory pressure), the null intent guard called stopSelf(), permanently killing SSE. Now recovers using repository.currentGeneration to resume the SSE subscription.
- session.idle streaming state cleanup — force-clear all streaming state (isStreaming, isSending, streamingSegments, pendingAssistantMessageId) in session.idle handler's no-content guard path, instead of leaving spinner visible indefinitely.
- Model list display — fixed ProviderList DTO to correctly parse server's {all: [...]} provider format. Created ModelLimitInfo data class to handle server's limit field (object with context/input/output keys instead of plain integer).
- ModelRef construction robustness — buildModelOptions() now uses model.id.ifBlank { modelKey } instead of raw map key, preventing mismatch when the server returns a different model ID than the map key.
- Variants sorted — variant list is now alphabetically sorted for stable UI display order.
- Bidirectional normalize — normalizeSelectionState() now validates both committed and draft selections (previously only draft), preventing stale references after restoreSelection.
- modelName 3-tier fallback — display label falls back through model.name, model.id, mapKey instead of just model.name and mapKey.
- Child session dedup — fixed duplicate child sessions appearing in the list. Added dedup helper and unfiltered child session lookup.
- Removed hide gate — child sessions previously required a "show hidden" toggle to appear; now always visible in the tree.
- Session refresh guard — added guard to prevent concurrent session list refreshes from corrupting the UI state.
- Startup crash when server unreachable — deferred SSE service start until after a successful connection is verified, preventing crash on app launch when the saved server is offline.
Full Changelog: v1.3.1...v1.4.0
OConnector v1.3.1
What's New in v1.3.1
Added
- SSE connection generation — atomic generation counter ensures stale events from previous connections are filtered out at both EventBus and ViewModel layers. Prevents ghost messages when switching servers or reconnecting.
- Network recovery monitoring — automatic SSE restart when network connectivity recovers after a disconnect.
Fixed
- Startup crash when server unreachable — the SSE foreground service was started before
testConnection()confirmed the server was reachable. When the server was down, the service entered a retry loop that raced withdisconnect(). Nowconnect()only configures the HTTP/SSE clients, andstartSseService()is called only after the connection test succeeds. - DTO deserialization crash — all non-null DTO fields now have default values, and
coerceInputValues = trueis enabled on the Json instance. Server responses with missing or null fields no longer causeMissingFieldExceptionorIllegalArgumentException. - Recovery bubble false positive — the recovery heuristic no longer triggers when AI is actively working via TUI.
- Agent picker missing custom agents — agents with
hidden: null(instead offalse) are no longer filtered out. - Main thread Keystore I/O —
getPassword()now runs onDispatchers.IOinstead of the main thread, preventing ANR during EncryptedSharedPreferences initialization. - SSE client thread safety —
sseClientmarked@Volatile,sseChannelusesAtomicReferenceto prevent data races. - Foreground service crash —
SseForegroundService.start()andrestart()now catchForegroundServiceStartNotAllowedException. - NetworkMonitor SecurityException —
registerNetworkCallback()wrapped in try-catch for permission-denied edge cases. - Null intent service restart —
onStartCommandwith null intent (system restart) now callsstopSelf()and returnsSTART_NOT_STICKYto avoid stale generation state.
Full Changelog: v1.3.0...v1.3.1
OConnector v1.3.0
What's New in v1.3.0
Added
- Multi-server management — new Server List home screen. Add, connect, and manage multiple OpenCode servers. Each server stores its own name, host, port, credentials, and TLS settings.
- Scroll-to-bottom button — the previously unused left piano key in the chat input bar is now a "scroll to bottom" button. Taps re-enable auto-scroll and jump to the latest message.
- Keyboard-aware auto-scroll — when the soft keyboard opens, the chat automatically scrolls to keep the latest messages visible above the input bar.
- Per-project memo panel — swipe left on the project session list to open a slide-in memo panel. Create, edit, and delete memos scoped to each project. Collapsed memos show a checkbox for marking done; expanded memos have editable title and content fields. Long-press to delete with confirmation. Persisted locally via DataStore.
Changed
- Language toggle & help button moved to Server List — removed from the Add Server / Connection screen to avoid duplication.
- Tips card moved to Server List — connection tips now shown at the bottom of the Server List screen.
- Update check moved to Server List — download button now shows on the Server List home screen on app launch.
Fixed
- Auto-scroll root cause (frame race) — initial scroll used
isLoading(Composition phase) as trigger, butLazyColumn.totalItemsCountonly updates in Layout phase. Replaced withsnapshotFlowthat only fires when layout catches up to data. - AI output scroll stuck at agent name — added forward
scrollBy(100_000f)afterscrollToItemto ensure the absolute bottom is visible. - Streaming output auto-scroll failure — re-designed the entire scroll pipeline.
- APK download proxied for China — downloads automatically routed through
gh-proxy.commirror. - Question/Permission bubble lost after app kill — Q/P blocking state now persisted to
SharedPreferences(disk) alongside memory cache. Survives app kill, device restart, and force stop. - Streaming output lost after app kill — streaming segments, pending message ID, and agent name now persisted to disk. Re-entering a session after process death restores the AI output progress.
- RecoveryBubble "Check Status" button not working — added dedicated
recheckBlockingState()method that clears heuristic state first, then tries cache (memory to disk), then falls back to a fresh server query. - Connection form scroll & password visibility — Add Server form now scrolls when keyboard pushes content off-screen. Password field has a visibility toggle.
Full Changelog: v1.2.0...v1.3.0
OConnector v1.2.0
v1.2.0
New Features
- Side panel — swipe left anywhere on screen to open a file browser and model info panel. Navigate project directories, view model/provider details, and track context window usage.
- File preview — tap any
.mdor.txtfile in the file browser to preview its content inline without leaving the chat. - Todo task panel — overlay panel shows active AI task progress. Badge count in toolbar. Auto-dismisses and sends notification when all tasks complete.
- Ask/Confirm bubbles — when the AI needs permission or asks a question, inline bubbles appear. Permission bubble has Allow Once / Always Allow / Reject. Question bubble has selectable options and custom text input.
- Sequential question answering — multiple questions presented one at a time with Back/Next navigation. Progress bar shows current step.
- Sequential permission confirmation — multiple permission requests queued and presented one at a time.
- Multi-select questions — questions with
multiple: trueallow selecting several options at once. - Undo/Redo — undo the last user message (soft-hides + rolls back file changes). Redo restores. Undone text restored to input box.
- Per-prompt model selection — choose a different AI model for each message. Nested
{ providerID, modelID }selector sent with each prompt. - Context usage display — shows current context token consumption (e.g. "32K") alongside model selector in input bar.
- Manual update check button — refresh button on connection page to trigger update check anytime.
- Update check mirror sources — GitHub +
gh-proxy.comCDN mirrors checked concurrently. If any source responds, update is detected. - Version filtering — skips pre-release versions (e.g.
v1_pr1); only stablevX.Y.Zconsidered. - Help page expansion — new sections for Model Selection, Context Usage, Undo/Redo, and Update Check (EN/ZH).
- Child session filtering — optional toggle to hide sub-sessions from project list.
- Comprehensive API documentation —
OPENCODE_API.mddocuments all REST endpoints, SSE events, and data models.
Fixed
- Streaming message flicker/disappear — unified placeholder uses real message ID so LazyColumn updates in-place with zero visual discontinuity.
- Streaming stalls and blocks — watchdog timer detects and recovers stalled SSE streams. Stale state abort on re-entry.
- Model selector not persisting — fixed
ModelRefnested DTO format for server compatibility. - Context usage inaccurate — reverse scan extracts only latest assistant message's
inputtokens. - Session.idle race condition — delayed cleanup with retry-based message fetch and verification.
- Update check fails in restricted networks — concurrent mirror sources with Channel racing.
Changed
- Chat input bar redesign — three-section piano-key style bar with model selector, context usage, and expandable text input.
- SSE pipeline optimization — 256 buffer, 16ms coalescing, 45s heartbeat timeout.
- Smart auto-scroll — only scrolls when user is near bottom.
- ExpandableSegment default expanded — code/text segments show full content by default.
Full Changelog: v1.1.2...v1.2.0
OConnector v_pr2
v_pr2
PR Version Naming Convention: Starting from this release, all PR (community-contributed) versions will use the �_pr naming format (e.g. �_pr2, �_pr3). PR versions are maintained separately from the main branch releases and contain community-contributed features that have not yet been merged into the main branch.
Branch Convention: All PRs should be merged into the pr_version branch. Contributors are expected to perform final checks and ensure compatibility with the latest pr_version branch before submitting. The pr_test branch is a backup/testing-only branch.
New Features
- Session usage insights & actions — view session usage statistics and quick actions directly from the session list.
- Chat session state persistence — chat scroll position and "follow latest output" state are now persisted, so you won't lose your place when rotating the screen or switching apps.
- Chat configuration overrides — customize chat behavior with configuration overrides for a more tailored experience.
- Todo sync — todo items now sync in real-time with the server, keeping your task list always up to date.
- Improved chat refresh & bottom-follow — smoother chat refresh experience with reliable auto-scroll to the latest output.
- Updated help & project documentation — help page and project-level docs have been refreshed with the latest feature descriptions.
Credits
- Feature contributed by @BAYUNZIYUE via PR #9
Full Changelog: v1.1.2pr1...v_pr2
OConnector v1.1.2pr1
v1.1.2pr1
New Features
- Optional child session filtering — add a persisted preference to hide child sessions based on
parentID, wire the toggle into both sessions list top bars, and keep the filtered list reactive in the view model.
Changed
- Document the new child session filtering behavior in both English and Chinese README files.
Testing
- ./gradlew --no-daemon --max-workers=1 -Dorg.gradle.parallel=false assembleDebug
- Add SessionVisibilityTest coverage for enabled and disabled filtering.
Credits
- Feature contributed by @BAYUNZIYUE via PR #3
Full Changelog: v1.1.2...v1.1.2pr1
OConnector v1.1.2
v1.1.2
New Features
- Background SSE stability — foreground service with
dataSynctype keeps the SSE connection alive when the app is in the background. A persistent notification is displayed to comply with Android 14+ requirements. - In-app update check — automatically checks GitHub Releases for new versions when you open the connection page. If an update is available, a download icon appears next to the language button.
- Update dialog — tapping the download icon shows the changelog and a download button. The APK is downloaded via DownloadManager and installed through the system installer.
- Help page:
Check for Updatessection added (EN/ZH).
Fixed
- API 26-28 compatibility —
ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNCrequires API 29+. Added SDK version check to fall back gracefully on older devices. - i18n for update UI — UpdateDialog now uses localized strings instead of hardcoded English text.
Changed
- Help page version number now uses
BuildConfig.VERSION_NAMEinstead of a hardcoded string. - APK no longer tracked in the git repository — distributed via GitHub Releases instead.
Full Changelog: v1.1.1...v1.1.2