Commit e9409fe
authored
Unify provider sign-in on the hidden flow and match actions to errors (#120)
* Unify provider sign-in on the hidden flow and match actions to errors
Every Sign in button (setup card row, composer notices) now drives the
same server-side login flow the settings panel uses, through a shared
useProviderConnectFlow hook: inline "Signing in" status with the live
output line where the user clicked, no thread terminal takeover, and a
hand-off to the settings panel (deep-linked to the instance) when a run
stalls past the auto-expand threshold or fails while interactive. On the
held-send notice, a successful sign-in triggers the existing recheck, so
the held message releases itself through the normal preflight gate with
no second click. A replay guard keeps an attached surface from treating
a finished session from minutes ago as the run the user just started.
The provider status notice now earns its actions from the structured
snapshot instead of always offering Refresh and Diagnostics: signed out
gets Sign in alone, a missing CLI gets Open Settings plus Refresh,
disabled gets Open Settings, and probe trouble keeps Refresh plus
Diagnostics. URLs in provider status details render as real links via a
shared linkifier, so the Claude install address stops being dead text.
* Assert the linkifier round-trip on segments instead of stripping tags
CodeQL flagged the test's tag-stripping regex as incomplete multi
character sanitization. It was never sanitizing, just recovering text
content from static markup, but the pure segment splitter's documented
invariant (concatenated segments reproduce the input) states the same
property directly without the alert-bait pattern.
* Open the hand-off terminal as soon as the flow is active
Screenshot verification caught the settings hand-off restarting the
stall timer: a user who already waited out the threshold in chat arrived
at settings and waited it out again before the terminal appeared. The
?instance= deep link now threads through the provider card to the login
flow, which opens its terminal immediately while the session is active.1 parent 6d80a0c commit e9409fe
22 files changed
Lines changed: 1375 additions & 219 deletions
File tree
- apps/web
- src
- components
- chat
- settings
- lib
- routes
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3761 | 3761 | | |
3762 | 3762 | | |
3763 | 3763 | | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
3764 | 3781 | | |
3765 | 3782 | | |
3766 | 3783 | | |
| |||
3785 | 3802 | | |
3786 | 3803 | | |
3787 | 3804 | | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
3788 | 3810 | | |
3789 | 3811 | | |
3790 | 3812 | | |
| |||
3817 | 3839 | | |
3818 | 3840 | | |
3819 | 3841 | | |
3820 | | - | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
3821 | 3846 | | |
3822 | 3847 | | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
| 3887 | + | |
| 3888 | + | |
| 3889 | + | |
| 3890 | + | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
| 3897 | + | |
| 3898 | + | |
| 3899 | + | |
| 3900 | + | |
| 3901 | + | |
| 3902 | + | |
| 3903 | + | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
| 3909 | + | |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
3823 | 3942 | | |
3824 | 3943 | | |
3825 | 3944 | | |
| |||
3859 | 3978 | | |
3860 | 3979 | | |
3861 | 3980 | | |
3862 | | - | |
| 3981 | + | |
3863 | 3982 | | |
3864 | 3983 | | |
3865 | 3984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
2494 | 2496 | | |
2495 | 2497 | | |
2496 | 2498 | | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
2497 | 2526 | | |
2498 | 2527 | | |
2499 | 2528 | | |
| |||
3410 | 3439 | | |
3411 | 3440 | | |
3412 | 3441 | | |
3413 | | - | |
3414 | | - | |
3415 | | - | |
3416 | | - | |
3417 | | - | |
3418 | | - | |
3419 | | - | |
3420 | | - | |
3421 | 3442 | | |
3422 | 3443 | | |
3423 | 3444 | | |
| |||
3432 | 3453 | | |
3433 | 3454 | | |
3434 | 3455 | | |
3435 | | - | |
3436 | 3456 | | |
3437 | 3457 | | |
3438 | 3458 | | |
| |||
5240 | 5260 | | |
5241 | 5261 | | |
5242 | 5262 | | |
| 5263 | + | |
5243 | 5264 | | |
5244 | 5265 | | |
5245 | 5266 | | |
| |||
5262 | 5283 | | |
5263 | 5284 | | |
5264 | 5285 | | |
5265 | | - | |
| 5286 | + | |
5266 | 5287 | | |
5267 | 5288 | | |
5268 | 5289 | | |
5269 | 5290 | | |
5270 | 5291 | | |
5271 | 5292 | | |
| 5293 | + | |
5272 | 5294 | | |
5273 | | - | |
5274 | 5295 | | |
5275 | 5296 | | |
5276 | 5297 | | |
| |||
5284 | 5305 | | |
5285 | 5306 | | |
5286 | 5307 | | |
5287 | | - | |
5288 | | - | |
5289 | | - | |
5290 | | - | |
5291 | | - | |
5292 | | - | |
5293 | | - | |
| 5308 | + | |
5294 | 5309 | | |
5295 | 5310 | | |
5296 | 5311 | | |
| |||
5299 | 5314 | | |
5300 | 5315 | | |
5301 | 5316 | | |
| 5317 | + | |
5302 | 5318 | | |
5303 | 5319 | | |
5304 | 5320 | | |
5305 | | - | |
5306 | 5321 | | |
5307 | 5322 | | |
5308 | 5323 | | |
| |||
0 commit comments