Skip to content

fix(android): hide the Databricks workspace nav chrome in the WebView shell - #4555

Merged
github-actions[bot] merged 1 commit into
omnigent-ai:mainfrom
fanzeyi:fanzeyi/android-hide-workspace-chrome
Aug 10, 2026
Merged

fix(android): hide the Databricks workspace nav chrome in the WebView shell#4555
github-actions[bot] merged 1 commit into
omnigent-ai:mainfrom
fanzeyi:fanzeyi/android-hide-workspace-chrome

Conversation

@fanzeyi

@fanzeyi fanzeyi commented Aug 10, 2026

Copy link
Copy Markdown
Member

Related issue

Closes #

Summary

  • A workspace-hosted Omnigent is mounted as a Databricks workspace page, so
    the workspace wraps the SPA in its top-nav shell (the dark bar with the
    workspace switcher). In the Android shell that bar was still painted: it
    wastes vertical space and, worse, lets a user navigate into another workspace
    app with no way back into Omnigent.
  • The electron and iOS shells already hide it; port the same fix to Android.
    New WorkspaceChromeScript holds the CSS plus the install-once JS, and
    OmnigentWebViewClient.onPageFinished evaluates it on every finished
    pinned-origin load.
  • Keyed on the pinned origin, never on the URL path: the workspace serves the
    SPA on more than one mount (/ml/omnigents, /omnigent) and an auth
    redirect can land on neither, so a path guard leaves the chrome visible. The
    rule targets Omnigent's own .omnigent-app root rather than the
    monolith-owned nav markup, so it can't silently break when Databricks
    reshuffles its chrome, and is a no-op on standalone builds.

Test Plan

  • cd web/android && ./gradlew :app:testDebugUnitTest --tests '*WorkspaceChromeScriptTest' --tests '*OmnigentWebViewClientTest' — 22 tests, all green.
  • New WorkspaceChromeScriptTest covers the CSS contract, the install-once
    guard, and that the CSS is embedded as an escaped JS string literal.
  • OmnigentWebViewClientTest now asserts injection order (chrome CSS before
    the facade, whose callback declares the page ready), injection without the
    facade fallback, that injection is not gated on the UI mount path, and that
    an off-origin load injects nothing.

Demo

image

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

Unit tests cover the script contents and the injection points in the WebView
client. The visual result is the same CSS the electron and iOS shells already
apply.

Changelog

The Android app no longer shows the Databricks workspace navigation bar around
Omnigent when connecting to a workspace-hosted server.

Signed-off-by: Zeyi (Rice) Fan zeyi.f@databricks.com

@github-actions github-actions Bot added the size/M Pull request size: M label Aug 10, 2026
… shell

## Related issue

Closes #

## Summary

- A workspace-hosted Omnigent is mounted as a Databricks workspace *page*, so
  the workspace wraps the SPA in its top-nav shell (the dark bar with the
  workspace switcher). In the Android shell that bar was still painted: it
  wastes vertical space and, worse, lets a user navigate into another workspace
  app with no way back into Omnigent.
- The electron and iOS shells already hide it; port the same fix to Android.
  New `WorkspaceChromeScript` holds the CSS plus the install-once JS, and
  `OmnigentWebViewClient.onPageFinished` evaluates it on every finished
  pinned-origin load.
- Keyed on the pinned origin, never on the URL path: the workspace serves the
  SPA on more than one mount (`/ml/omnigents`, `/omnigent`) and an auth
  redirect can land on neither, so a path guard leaves the chrome visible. The
  rule targets Omnigent's own `.omnigent-app` root rather than the
  monolith-owned nav markup, so it can't silently break when Databricks
  reshuffles its chrome, and is a no-op on standalone builds.

## Test Plan

- `cd web/android && ./gradlew :app:testDebugUnitTest --tests '*WorkspaceChromeScriptTest' --tests '*OmnigentWebViewClientTest'` — 22 tests, all green.
- New `WorkspaceChromeScriptTest` covers the CSS contract, the install-once
  guard, and that the CSS is embedded as an escaped JS string literal.
- `OmnigentWebViewClientTest` now asserts injection order (chrome CSS before
  the facade, whose callback declares the page ready), injection without the
  facade fallback, that injection is *not* gated on the UI mount path, and that
  an off-origin load injects nothing.

## Demo

N/A — logic-only parity port; the CSS is unchanged from the electron and iOS
shells, which already ship this behaviour.

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] UI / frontend change
- [ ] Refactor / chore
- [ ] Docs
- [ ] Test / CI
- [ ] Breaking change

## Test coverage

- [x] Unit tests added / updated
- [ ] Integration tests added / updated
- [ ] E2E tests added / updated
- [ ] Manual verification completed
- [ ] Existing tests cover this change
- [ ] Not applicable

## Coverage notes

Unit tests cover the script contents and the injection points in the WebView
client. The visual result is the same CSS the electron and iOS shells already
apply.

## Changelog

The Android app no longer shows the Databricks workspace navigation bar around
Omnigent when connecting to a workspace-hosted server.

Signed-off-by: Zeyi (Rice) Fan <zeyi.f@databricks.com>
@fanzeyi
fanzeyi force-pushed the fanzeyi/android-hide-workspace-chrome branch from 729a4a4 to 8d660a8 Compare August 10, 2026 22:38
@fanzeyi fanzeyi added the automerge Automatically Run Merge CI label Aug 10, 2026
@github-actions
github-actions Bot enabled auto-merge (squash) August 10, 2026 22:51
@github-actions
github-actions Bot merged commit 9b53b4f into omnigent-ai:main Aug 10, 2026
52 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically Run Merge CI size/M Pull request size: M skip-e2e-ui-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant