Repository navigation
feat(gui): enforce FutureOS sign-in, hide pairing code, cap @-picker, add platform param - #51
Merged
Merged
Conversation
- Limit the @ file picker to 10 results (no scrollbar) so the upward popover no longer overflows its container and clips the top row. - Rank @ search by match bucket (exact name > name prefix > name substring > path substring > fuzzy) so the best match lands on top; empty query still recency-ordered. - Update composer placeholder copy (zh/en) to describe tasks, @ context, / skills. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Stop displaying the device user code in the login dialog; the authorization page opens directly and the device-code poll loop is unchanged. Append the client platform (macOS / Windows / Linux, else empty) as a platform query param to the authorization URL opened in the browser, and to the copy-link fallback. Drop the now-unused verify/copy-code i18n strings and refresh the waiting copy. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
When no FutureOS account is signed in (on launch, or after signing out), a full-screen gate overlays the entire app with a title, subtitle, sign-in button, and language switch — the rest of the app is unreachable until sign-in succeeds. The existing device-code flow opens the browser directly (no pairing-code display, no modal). Extract the login state machine from FutureLoginDialog into useFutureLoginFlow (adds idle phase, cancel, callers control begin timing). Add useFutureSignedIn (providers search + future-auth-changed event-driven silent reload) and the ForceLoginGate component. AppShell early-returns the gate (or a short neutral spinner on first load) after all hooks, so the rules-of-hooks invariant is preserved. All existing login surfaces (settings Account / Providers dialogs) still work unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
This PR bundles four GUI improvements worked on in this session:
1. Enforce FutureOS sign-in with full-screen login gate
future-auth-changedevent, which drives the gate appearance/clearing via a globaluseFutureSignedInhook inAppShell.FutureLoginDialoginto a shareduseFutureLoginFlowhook (addsidlephase andcancel). Both the gate and the existing settings login dialogs use it.2. Hide the pairing code during login
verifyCode/copyCode/authLinklabels; refreshedgettingDeviceCode/waiting/description.3. Append platform param to the opened authorization URL
platformquery param (macOS/Windows/Linux, else empty) to the authorization page URL so the web side can tailor itself.login_platform()(compile-timecfg!) andappend_login_platform()helpers with tests.4. Fix @-mention picker: cap results, rank filename matches first
file_namehelper and a ranking test.Files changed
components/layout/ForceLoginGate.tsx(new),components/layout/hooks/useFutureSignedIn.ts(new)features/settings/useFutureLoginFlow.ts(new),FutureLoginDialog.tsx(rewritten)future_login.rsMentionEditor.tsx,workspace_files.rsfutureEvents.ts,providers.tsAppShell.tsxlayout.json(zh/en) + gate keys;agent.json(zh/en) placeholder;settings.json(zh/en) futureLogin cleanupTest plan
cd gui && npx tsc --noEmit— passescd gui && npx eslint "src/**/*.{ts,tsx}"— 0 errorscd gui && npx vitest run— 197 passedcd gui/src-tauri && cargo test --lib workspace_files— 4 passed (new + existing)cd gui/src-tauri && cargo test --lib future_login— 6 passed (new + existing)make run-gui— gate on cold start, gate after sign-out, gate → sign-in → app, @-picker no clipping, @ ranking, settings login dialog regression, language switch on gate🤖 Generated with Claude Code