Skip to content

Commit 538d138

Browse files
committed
Merge origin/main into claude/project-thread-f6p2x0
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5ktJb5rQ5n2GUXSQMR
2 parents debe361 + dabef0f commit 538d138

18 files changed

Lines changed: 392 additions & 51 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/auth': patch
3+
---
4+
5+
fix(auth): with email+password sign-in off, phone sign-in on and no single sign-on, the login card draws the phone way in on first paint instead of a single sign-on view
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`LoginForm` collapsed into the single sign-on view whenever the server turned email+password sign-in off (`emailPassword.enabled: false`), whether or not single sign-on existed. A deployment that signs in by phone only showed its users "Use a password instead" and, behind it, a "Back to single sign-on" button with no single sign-on anywhere. Now, with the password door shut, no single sign-on offered (`features.sso`) or enforced (`features.ssoEnforced`) and a phone way in advertised (`features.phoneNumber` or `features.phoneNumberOtp`), the form is drawn on first paint:
11+
12+
- the identifier field reads "Phone number" (the existing `phoneLabel` / `phonePlaceholder` labels), since the server refuses an email address;
13+
- with phone OTP the only way in, the form opens on the verification-code step and offers no switch to a password form the server refuses;
14+
- no "Back to single sign-on" button, no sign-up link and no password-form description, all of which name a door the server refuses.
15+
16+
A shut password door with single sign-on offered, declared enforcement, the no-method state and a failed config fetch (the password form, break-glass) are unchanged.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-calendar': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(plugin-calendar): a reschedule of a record that is gone for this session toasts a translated sentence naming the object by its label
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
- **`@object-ui/plugin-calendar`:** when a drag-to-reschedule is refused with `404 RECORD_NOT_FOUND` (the record was deleted, or row-level security no longer shows it to this user), the toast used to show the server's own sentence, "Record ID not found in OBJECT_NAME": English in every session, with the record id and the object's machine name. It now says, in the session language, that this record of the object (named by its label) no longer exists or is no longer accessible. The label is the one the object schema serves, else the app's translation of it; with neither, the toast says the existing generic "This record doesn't exist, or you don't have access to it." and never the machine name. The event still snaps back to its day. A refusal the producer marked for the user, an external-source refusal and a permission refusal keep their own messages, ahead of this one.
12+
- **`@object-ui/i18n`:** `calendar.rescheduleNotFound` in all eleven locale packs (zh-Hant generated from zh-Hans).

‎.claude/skills/pm-dispatch/references/landing-operations.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
- 判据唯一来源是签名台账(锚点 issue),优先于现场判断;只有人工能升级台账。
2727
- 疑似新 flaky 只留提请,⛔ 不自行加表;纯计数不追记,只有改变修法作用域时才记。
2828
- 四分支:已知 flaky ⇒ 原样重投;已修签名再现 ⇒ ⛔ 不重投,判新问题重新诊断。
29-
- 基上缺已合修复 ⇒ merge main 推新提交,重跑无效。
29+
- 基上缺已合修复 ⇒ merge main 推新提交,重跑无效;新语种包落地致翻译门禁红同属此支。
3030
- 新签名 ⇒ ⛔ 不重投,PR 与其 `Fixes` 卡各留完整签名与初判;下条三事实全立可重投一次。
3131
- 三事实:失败文件 import 闭包与 diff 不相交、队列基座同 shard 绿、首错是超时非断言。
3232
- 每次处置留审计评论,重投写签名与台账依据或三行回执;同签名再弹即停,交下一席重诊。
33+
- 标签 PR 末次绿 PR 跑后 main 落新语种包 ⇒ 挂 auto-merge/入队前 merge main 重跑,`behind` 例外。
34+
- 标签即 `check-generated-translation-bundles`、`check-no-new-untranslated-declared-labels` 所计显示标签。
3335

3436
## A. 碰生成物的 PR:入队前先同步 + 整体重生成
3537

@@ -54,15 +56,13 @@
5456
- 落地评论 = 两个读数的探针表 + 一行状态变更(摘标/关卡/收口),⛔ 不复述 `## 席位核对`。
5557
- 转 ready/入队前跑 `check-governed-merges.mjs --pr N`:受管面照两层;>3000 行(含生成物)照 Tier H。
5658
- ⛔ 两层不由席位批准;清标即落地同受此闸,漏判会被队列守卫在 merge group 里拒收。
57-
- 再读 `mergeable_state`:`dirty` ⇒ 先 merge `origin/main` 再挂;生成物在面上按 A 的固定序。
5859
- 挂 auto-merge 的同一动作里重测生成物漂移,⛔ 不复用更早的零;非零 ⇒ 按 A 的固定序。
5960
- ready + 全绿 ≠ 已入队:队列从不主动拉 PR,入队是显式动作。
6061
- 零 `enqueued` 事件按序查三条:① `mergeable_state` 是否 `dirty`。
6162
- ② enable-auto-merge 调用根本没落地,重发与效果验证序列见 `platform-readings.md`。
6263
- ③ PR 碰 `.github/workflows/**`:令牌常驻 `workflows: write`(裁决评论 6104822731),仍拒即授权漂移。
6364
- 确认 MERGED 同一动作里给 `Part of` 卡收口、`Fixes` 卡代关但标也须摘,⛔ 不拆到下轮巡检。
6465
- 摘标换回 `pm:queue` 或按剩余物定级,加一条写清交付了什么、剩下归谁的评论。
65-
- 同刻读相关卡 `closed_by_pull_requests`,确认没有卡被正文闭合关键词误关。
6666
- 每次合并后重拉一次车道盘点与预期状态对账,⛔ 不留给下轮巡检。
6767
- 取 open 卡清单对照预期 diff:预期之外从 open 消失的,就是被闭合关键词静默误关的卡。
6868
- 落地后再核一次落地判据本身:队列的合并同样走 os-regen,A 的静默吞并一样能发生。

‎ui/packages/auth/src/LoginForm.tsx‎

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,30 @@ export function LoginForm({
336336
};
337337
}, [getAuthConfig]);
338338

339+
// A phone way in the server advertises: phone+password, or phone OTP.
340+
const phoneSignInOffered = phonePasswordEnabled || phoneOtpEnabled;
339341
// Under enforced mode, and when the server has turned the password door off,
340342
// the password form is collapsed until the user opts into the break-glass
341-
// path; otherwise it's always shown.
342-
const passwordFormCollapsed = ssoEnforced || passwordSignInOff;
343+
// path; otherwise it's always shown. One exception: the password door shut
344+
// with no single sign-on offered but a phone way in. The form then holds the
345+
// way in (phone+password, phone OTP), so it is drawn on first paint; a
346+
// collapsed view there would be a single sign-on view with no single
347+
// sign-on in it.
348+
const passwordFormCollapsed =
349+
ssoEnforced || (passwordSignInOff && (ssoEnabled || !phoneSignInOffered));
343350
const passwordFormVisible = !passwordFormCollapsed || showPasswordFallback;
344351
// The break-glass link reveals the password form, so it is offered only
345352
// while that form holds a password door the server accepts: email+password
346353
// itself, or phone+password sign-in. The SSO button needs no link: the
347354
// SSO-only view draws it on first paint (`ssoEmailFormVisible` below).
348355
const breakGlassOffered = !passwordSignInOff || phonePasswordEnabled;
356+
// The form's mode as drawn: with no password door the server accepts, the
357+
// only way the form can hold is phone OTP, so it opens there and offers no
358+
// switch back to a password form the server refuses.
359+
const formMode = breakGlassOffered ? mode : 'phone-otp';
360+
// The identifier field names only what the server accepts: with email
361+
// sign-in refused, a phone number is the one identifier left.
362+
const phoneOnlyIdentifier = passwordSignInOff && phonePasswordEnabled;
349363
// Nothing the server advertises lets anyone in: say so, instead of SSO copy
350364
// with no SSO affordance and a password link the server refuses.
351365
const noSignInMethod =
@@ -407,7 +421,7 @@ export function LoginForm({
407421
// that the server rejects as "Invalid email" (#3238) — trim before use.
408422
const identifier = email.trim();
409423
try {
410-
if (mode === 'phone-otp') {
424+
if (formMode === 'phone-otp') {
411425
await signInWithPhoneOtp(phone.trim(), otpCode.trim());
412426
} else if (phonePasswordEnabled && looksLikePhoneIdentifier(identifier)) {
413427
// Unified identifier: a phone-shaped entry routes to phone+password.
@@ -570,7 +584,10 @@ export function LoginForm({
570584
? ssoOnlyCopy
571585
? l.ssoOnlyDescription
572586
: undefined
573-
: description
587+
: passwordSignInOff
588+
? // The password-form copy names a door the server refuses.
589+
undefined
590+
: description
574591
}
575592
/>
576593
)}
@@ -607,7 +624,7 @@ export function LoginForm({
607624
/>
608625

609626
{passwordFormVisible ? (
610-
mode === 'phone-otp' ? (
627+
formMode === 'phone-otp' ? (
611628
/* Phone-OTP sign-in (framework#2780): request a code, then verify.
612629
Server-side the number is guarded by a per-number cooldown +
613630
hourly cap — the resend button mirrors it with a countdown. */
@@ -674,13 +691,15 @@ export function LoginForm({
674691
{isLoading ? l.submittingButton : l.submitButton}
675692
</button>
676693

677-
<button
678-
type="button"
679-
onClick={() => switchMode('password')}
680-
className={`w-full text-center text-xs text-muted-foreground underline-offset-4 transition-colors hover:text-primary hover:underline ${AUTH_TOUCH_TARGET_CLASS}`}
681-
>
682-
{l.usePasswordSignInText}
683-
</button>
694+
{breakGlassOffered && (
695+
<button
696+
type="button"
697+
onClick={() => switchMode('password')}
698+
className={`w-full text-center text-xs text-muted-foreground underline-offset-4 transition-colors hover:text-primary hover:underline ${AUTH_TOUCH_TARGET_CLASS}`}
699+
>
700+
{l.usePasswordSignInText}
701+
</button>
702+
)}
684703
</form>
685704
) : (
686705
<form onSubmit={handleSubmit} className="space-y-4">
@@ -691,15 +710,26 @@ export function LoginForm({
691710

692711
<div className="space-y-2">
693712
<label htmlFor="login-email" className={AUTH_FIELD_LABEL_CLASS}>
694-
{phonePasswordEnabled ? l.emailOrPhoneLabel : l.emailLabel}
713+
{phoneOnlyIdentifier
714+
? l.phoneLabel
715+
: phonePasswordEnabled
716+
? l.emailOrPhoneLabel
717+
: l.emailLabel}
695718
</label>
696719
<input
697720
id="login-email"
698721
// `text` (not `email`) when a phone number is also accepted, so the
699-
// browser doesn't reject a phone-shaped value on native validation.
700-
type={phonePasswordEnabled ? 'text' : 'email'}
701-
inputMode={phonePasswordEnabled ? 'text' : 'email'}
702-
placeholder={phonePasswordEnabled ? l.emailOrPhonePlaceholder : l.emailPlaceholder}
722+
// browser doesn't reject a phone-shaped value on native validation;
723+
// `tel` when it is the only identifier the server accepts.
724+
type={phoneOnlyIdentifier ? 'tel' : phonePasswordEnabled ? 'text' : 'email'}
725+
inputMode={phoneOnlyIdentifier ? 'tel' : phonePasswordEnabled ? 'text' : 'email'}
726+
placeholder={
727+
phoneOnlyIdentifier
728+
? l.phonePlaceholder
729+
: phonePasswordEnabled
730+
? l.emailOrPhonePlaceholder
731+
: l.emailPlaceholder
732+
}
703733
value={email}
704734
onChange={(e) => setEmail(e.target.value)}
705735
required
@@ -783,8 +813,12 @@ export function LoginForm({
783813
</button>
784814
)}
785815

786-
{/* Break-glass form was opened under enforced mode — let the user
787-
collapse back to the SSO-only view. */}
816+
{/* Break-glass form was opened from the collapsed view — let the
817+
user collapse back to it. The form is collapsed only where single
818+
sign-on is enforced or offered (a shut password door with a phone
819+
way in and no SSO draws the form on first paint), and the link
820+
that opens it is offered only with a password door, so there is
821+
always single sign-on to go back to. */}
788822
{passwordFormCollapsed && showPasswordFallback && (
789823
<button
790824
type="button"
@@ -854,7 +888,9 @@ export function LoginForm({
854888
)}
855889
</div>
856890

857-
{registerUrl && !passwordFormCollapsed && (
891+
{/* Sign-up is an email+password door too: not offered while the server
892+
refuses that door, whether or not the form is collapsed. */}
893+
{registerUrl && !passwordFormCollapsed && !passwordSignInOff && (
858894
<p className="px-8 text-center text-[13px] text-muted-foreground">
859895
{l.noAccountText}{' '}
860896
<LinkComp href={registerUrl} className={AUTH_LINK_CLASS}>

0 commit comments

Comments
 (0)