Skip to content

#929 #833 Home top-bar overflow menu - #976

Merged
ivanfenenko merged 2 commits into
mainfrom
feature/929-home-overflow-menu
Nov 4, 2026
Merged

ivanfenenko merged 2 commits into
mainfrom
feature/929-home-overflow-menu

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Home's top bar keeps Terminal; the Settings button becomes a ⋯ button that opens the shared top-bar overflow menu (iOS OpenCodeTopBarOverflowHost, Android OpenCodeTopBarOverflowHost). For now the menu holds one entry, Settings (gear). ⌘, / Ctrl+, still open Settings directly.
  • New HomeMenu on both platforms (ios/.../UI/Main/HomeMenu.swift, android/.../ui/main/HomeMenu.kt): feature entries first in the given order, then Settings, behind a divider whenever anything sits above it.
  • Design system: the shared overflow menu entry gains dividerAbove on both platforms (1 px border-weak-base, 4 pt vertical padding, as in the Home menu prototype), with a Divider toggle in both component galleries and previews.
  • iOS fix in the shared menu: a row now takes taps across its full width and height. Before, only the icon and title were hit-testable, so a tap on the empty part of a row did nothing.
  • New string home.more_options / home_more_options ("More options"); Settings reuses common.settings. New analytics action home_open_menu; the Settings entry still logs home_open_settings.

Extension point for the Search, Archived sessions and Worktrees slices

Each slice adds its entry to the features list, in prototype order (Search sessions, Archived sessions, Worktrees). HomeMenu adds Settings and the divider:

  • iOS, ProjectListHomeView.homeMenuEntries:
    HomeMenu.entries(features: [
        OpenCodeOverflowMenuEntry(id: "homeMenuSearch", title: "home.menu.search", icon: .search,
                                  accessibilityIdentifier: "homeMenuSearch", action: { … }),
    ], openSettings: openSettings)
  • Android, MainScreen.kt homeMenuEntries:
    HomeMenu.entries(
        features = listOf(OpenCodeOverflowMenuEntry(title = stringResource(…), icon = OpenCodeIcons.Search, onClick = { … }, subtitle = …)),
        settingsTitle = stringResource(R.string.common_settings),
        onSettingsClick = { … },
    )
  • Use subtitle for "N in " / "N across M projects". Leave an entry out of the list to hide it (for example, Archived sessions on a server without archive support).

Checks

  • Android: :app:compileDebugKotlin, :app:compileDebugAndroidTestKotlin, :app:testDebugUnitTest --tests 'dev.opencode.mobile.ui.main.*' --tests 'dev.opencode.mobile.ui.keyboard.*' pass (new HomeMenuTest 3/3). ktlintCheck adds no new violations (MainScreen.kt and OpenCodeOverflowMenu.kt have the same counts as main).
  • iOS: HomeMenuTests, OpenCodeKeyboardShortcutTests and SessionListHomeChromeTests pass (44 tests). The UI test target builds. ConnectionSetupUITests (opens Settings through the new menu) passes on a dedicated simulator. An earlier run on a parallel-testing clone timed out evaluating a UI query while the host was under heavy load.
  • scripts/check-string-keys.mjs: keys match.
  • Android divider width (fa295aa): the panel column is width(IntrinsicSize.Max) and rows fill it, so a divider no longer stretches the menu across the window. New instrumented OpenCodeOverflowMenuLayoutTest passes on a Pixel 9a emulator at fa295aa (1 test). Grouped previews (subtitles plus divider) on both platforms.
  • CI at fa295aa is green. One ios-checks run first failed on SessionReadyStoreTests.testFocusedStatusEvent_thenLeave_thenIdleEvent_setsReadyWithoutBusySnapshot (timing test outside this change, all 3264 Swift Testing tests passed) and passed on a single rerun.
  • Checked by hand on the iOS simulator: ⋯ opens the menu; tapping the row, including its empty right side, opens Settings.
  • UI tests that tapped the Settings button now go through ⋯ then Settings: iOS ConnectionSetupUITests, StoreScreenshotUITests, OpenCode_MobileUITests; Android StoreScreenshotTest.

Evidence

Screenshots in the evidence comment. These are real-app captures of disconnected Home, with no server or session data. Snapshot tests can't draw this menu: it renders in a window overlay on iOS and a Popup on Android, which the snapshot renderers skip.

Issue

Part of #929 and #833

Risks / Follow-ups

  • Search sessions (Search sessions on Home #929), Archived sessions and Worktrees (Restore archived sessions and remove worktrees #833) entries land in their own slices, on top of this one.
  • The iOS row hit-area fix changes every overflow menu in the app (Session Chat, Files, Changes, feature flags). Each row now also fills the panel width.
  • Not checked: Ctrl+, on Android while the menu is open. The popup takes focus, so the shortcut probably waits until the menu closes, as with other popups.
  • Android open-menu screenshots are missing: the emulator was shut down from outside twice while the host was under heavy load. Android is covered by build, unit tests and an Android Home top-bar capture.

🤖 Generated with Claude Code


Note

Medium Risk
Changes primary Home navigation for all users and broadens iOS overflow-menu tap targets app-wide; keyboard shortcut behavior with an open Android menu is untested.

Overview
Home’s top bar now opens Settings from a ⋯ More options overflow menu instead of a dedicated gear button; Terminal stays when applicable. ⌘, / keyboard shortcuts still open Settings directly.

Shared HomeMenu builders on iOS and Android append Settings last and insert a dividerAbove group separator when feature entries sit above it (ready for Search, Archived, Worktrees). The design-system overflow menu gains dividerAbove on both platforms, with gallery toggles and previews.

Analytics: tapping ⋯ logs home_open_menu; choosing Settings still logs home_open_settings. New copy home.more_options / home_more_options.

On iOS, overflow rows now use a full-width contentShape so taps on empty row area register (fixes all overflow menus app-wide).

Tests: store screenshots and UI flows open Settings via ⋯ → homeMenuSettings; new HomeMenu unit tests cover ordering and dividers.

Reviewed by Cursor Bugbot for commit 2bcdffb. Bugbot is set up for automated code reviews on this repo. Configure here.

Home's Settings button becomes a ⋯ menu that holds Settings for now.
HomeMenu (iOS and Android) puts feature entries first, in order, and
adds Settings last behind a divider, so Search sessions, Archived
sessions and Worktrees each add one entry. The shared overflow menu
gains a dividerAbove slot, and on iOS a whole menu row now takes the
tap, not just its icon and text. ⌘, / Ctrl+, still open Settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

iOS (iPhone 17 simulator) and Android (Pixel 9a emulator). Real app, disconnected Home, no server or session data.

iOS Android
Home top bar: Terminal (when projects exist) + ⋯ replaces Settings iOS Home top bar Android Home top bar
⋯ menu open, light (Settings only for now) iOS Home menu light not captured, see below
⋯ menu open, dark iOS Home menu dark not captured
New dividerAbove slot, Component Gallery → Overflow Menu, Divider on iOS gallery divider not captured

Android menu-open captures are missing: the emulator was shut down from outside twice while the host was under heavy load. The Android menu uses the same shared OpenCodeTopBarOverflowHost as Session Chat and Files, and HomeMenuTest covers the entry list.

@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

@cursor review

@ivanfenenko
ivanfenenko marked this pull request as ready for review November 3, 2026 21:31

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2bcdffb. Configure here.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: no finding that 2+ of 2 passes agreed on.

opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.124 · 1 pass(es) failed

@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

Android: Home ⋯ menu (real app, scenario harness v2, fixture sessions)

Menu open on Home
Android Home with the ⋯ menu open, showing Settings

Checked on the Android emulator: ⋯ opens the menu, and the Settings entry opens Settings. This fills the Android open-menu gap named under Risks.

ivanfenenko added a commit that referenced this pull request Nov 3, 2026
- Undo the overflow menu width change; #976 fixes the divider there.
- Session Chat: session.unarchived clears the banner directly, and an
  archive change since a session read began wins over that read, so a
  lagging GET no longer brings the banner back (both apps). iOS also
  clears the banner on rebind.
- Archived list: unarchived or deleted rows stay gone while a list still
  carries their old archive time; Undo rows keep their project, so an
  unknown directory no longer drops them; one failing project keeps the
  others listed (both apps).
- iOS: subscribe to events before the first load, and report
  cancellation from ArchivedSessionList.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HorizontalDivider fills the width it is offered, and the panel offered
the popup window's width, so a divider stretched the menu across the
screen. The panel column now takes its widest row's intrinsic width,
and every row fills it, so the whole row takes the tap as on iOS.
Adds a grouped preview (subtitles plus divider) on both platforms and
an instrumented layout test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ivanfenenko
ivanfenenko merged commit a71c656 into main Nov 4, 2026
@ivanfenenko
ivanfenenko deleted the feature/929-home-overflow-menu branch November 4, 2026 08:18
ivanfenenko added a commit that referenced this pull request Nov 4, 2026
main's only new commit is the #976 squash, whose tree matches fa295aa,
already merged here in a9d2fac, so this branch's tree is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant