feat(mobile): surface team-vault first-access state on mobile (#70) - #210
Merged
Conversation
The mobile shell rendered no team-vault state at all, so a member who opened a keyless team vault saw an empty hosts list with no explanation, and the role-aware landing never fired: applyFirstViewNav writes uiStore.activeNav, which MobileShell does not read. Extract the desktop panel and its predicate so both shells share them, then mount the panel in MobileShell and give applyFirstViewNav a mobile branch that navigates through mobileNavStore instead. MobileHeader rides above the panel because it owns the only route to the vault switcher on mobile; without it a member who opened a keyless vault could never reach another one. Immersive mode is suppressed for the same reason: it hides the tab bar. The session and SFTP layers stay mounted under the panel so a live terminal or SFTP connection survives. No new strings — mobile reuses the existing teamVault keys.
Closed
4 tasks
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.
Closes the last unbuilt item on #70: mobile surfacing.
The mobile shell rendered no team-vault state at all. A member who opened a keyless team vault got an empty hosts list with no explanation, and the role-aware landing from #186 never fired on mobile —
applyFirstViewNavwritesuiStore.activeNav, whichMobileShelldoes not read.What changed
Shared, not copied.
TeamVaultStatemoves out ofMainPanel.tsxintosrc/components/team/TeamVaultStatePanel.tsxunchanged, and the blocked-status rule becomesisBlockedTeamVaultStatuson the store that ownsTeamVaultStatus. Both shells read one predicate throughuseBlockedTeamVault, so the five statuses and the selection rule exist once.Mobile mount.
MobileShellrenders the panel above every screen and pushed page when the selected team vault is blocked — the same statuses desktop covers (offline,forbidden,payment_required,awaiting_key,error).Role-aware landing.
applyFirstViewNavgains a mobile branch that navigates throughmobileNavStore.firstViewNavis untouched, so the permission-bit rule stays in one place;mobileFirstViewTargetonly maps its result onto the mobile shell's two-axis navigation —hostsis a tab, while the keychain and members are pushed pages under More.Two things the desktop version does not need
The mobile shell has no sidebar, and both of these are dead ends rather than polish:
MobileHeader, inside the tab screens the panel replaces. Covering everything would leave a member who opened a keyless vault with no way back to any other vault. The panel keeps aMobileHeaderabove it — desktop's sidebar is never covered either, so this is the same rule, not an exception to it: the panel replaces vault contents, not vault chrome.Both are pinned by tests that failed for the right reason before the fix.
The session and SFTP layers stay mounted under the panel — unmounting them would drop a live terminal or an SFTP connection. The plain tab screens are unmounted, since they only list vault objects and the panel covers them.
No new strings: mobile reuses the existing
layout.mainPanel.teamVault.*keys.Verification
npx tsc --noEmitclean. 232 test files / 1738 tests pass across every directory the diff touches (services,stores,hooks,components/{team,mobile,layout}), plus the two cross-directory importers (runtime.mobileScreen,VaultShareSheet). New tests: the mobile nav mapping, the shell-aware landing on both shells, the blocked-status rule, the shared panel's copy, and the fourMobileShellmount cases including the two dead ends above.Not device-verified. No
adb, emulator, or/dev/kvmon the dev box, so the layout in a real WebView and the two-account keyless window were not exercised on hardware. That gate is still owed before #70's mobile checkbox is ticked.