Skip to content

[PM-28834] bug: Setting configuration for VR devices on MainActivity#6563

Merged
aj-rosado merged 3 commits into
mainfrom
PM-28834/setting-app-layout-horizonos
Apr 30, 2026
Merged

[PM-28834] bug: Setting configuration for VR devices on MainActivity#6563
aj-rosado merged 3 commits into
mainfrom
PM-28834/setting-app-layout-horizonos

Conversation

@aj-rosado
Copy link
Copy Markdown
Contributor

@aj-rosado aj-rosado commented Feb 23, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-28834

📔 Objective

Set the configuration on MainActivity so that it appears properly on HorizonOS devices.

@aj-rosado aj-rosado requested review from a team and david-livefront as code owners February 23, 2026 14:01
@aj-rosado aj-rosado changed the title [PM-28834] Setting configuration for HorizonOS devices on MainActivity [PM-28834] Setting configuration for VR devices on MainActivity Feb 23, 2026
@github-actions github-actions Bot added the app:password-manager Bitwarden Password Manager app context label Feb 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 23, 2026

Logo
Checkmarx One – Scan Summary & Details6bb238b8-82cf-459d-84b7-8b2212d43df1

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.69%. Comparing base (3845c1f) to head (56ed41f).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6563      +/-   ##
==========================================
- Coverage   85.80%   85.69%   -0.12%     
==========================================
  Files         835      839       +4     
  Lines       59391    59490      +99     
  Branches     8668     8672       +4     
==========================================
+ Hits        50963    50977      +14     
- Misses       5441     5524      +83     
- Partials     2987     2989       +2     
Flag Coverage Δ
app-data 17.54% <0.00%> (-0.01%) ⬇️
app-ui-auth-tools 20.13% <100.00%> (+<0.01%) ⬆️
app-ui-platform 15.85% <0.00%> (-0.01%) ⬇️
app-ui-vault 25.66% <0.00%> (-0.01%) ⬇️
authenticator 6.61% <0.00%> (-0.05%) ⬇️
lib-core-network-bridge 4.27% <0.00%> (+0.01%) ⬆️
lib-data-ui 1.02% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aj-rosado aj-rosado changed the title [PM-28834] Setting configuration for VR devices on MainActivity [PM-28834] fix: Setting configuration for VR devices on MainActivity Feb 24, 2026
@aj-rosado aj-rosado changed the title [PM-28834] fix: Setting configuration for VR devices on MainActivity [PM-28834] bug: Setting configuration for VR devices on MainActivity Feb 25, 2026
@aj-rosado aj-rosado added the t:bug Change Type - Bug label Feb 25, 2026
@aj-rosado aj-rosado added the ai-review-vnext Request a Claude code review using the vNext workflow label Apr 29, 2026
override fun onPostCreate(savedInstanceState: Bundle?) {
super.onPostCreate(savedInstanceState)
// resize only one time at the start
if (!mainViewModel.stateFlow.value.hasResizeBeenRequested) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So if the activity is recreated, we still don't want to make the request again?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, that is the intended behaviour, resize request runs only once during startup, after the UI is created, and not in response to user-driven panel resizing.

Comment thread app/src/main/kotlin/com/x8bit/bitwarden/MainActivity.kt Outdated
Comment thread app/src/main/kotlin/com/x8bit/bitwarden/MainActivity.kt Outdated
@github-actions github-actions Bot added the app:authenticator Bitwarden Authenticator app context label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR adds HorizonOS (Meta Quest) device detection and requests a 1024×640 window resize via reflection during MainActivity.onPostCreate. The new setHorizonOSAppLayout extension lives in ui/.../ActivityExtensions.kt (annotated @OmitFromCoverage), and MainViewModel tracks a hasResizeBeenRequested flag to ensure the resize is only requested once per ViewModel lifetime. Test coverage was added for the new ResizeHasBeenRequested action handler.

Code Review Details

No new findings from this review pass.

Three existing unresolved threads from david-livefront are awaiting author response:

  • MainActivity.kt:219 — question about whether resize should re-fire on Activity recreation (note: ViewModel survives config changes, so the flag persists across recreation but resets on process death — this appears to be intentional).
  • Two outdated threads on MainActivity.kt (extension extraction and try/catch scope) — these appear to have been addressed in commit 56ed41f2b which extracted the logic to ActivityExtensions.kt. The author may want to mark them resolved.

@aj-rosado aj-rosado added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit cdd682c Apr 30, 2026
31 checks passed
@aj-rosado aj-rosado deleted the PM-28834/setting-app-layout-horizonos branch April 30, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants