Repository navigation
Commit 9b3227f
fix(console): first-run checklist counts like its progress, names Setup per language, folds to one line (#36013)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuEwfVd7uXPuit61egsUgNQ6)_
repo:objectstack#1 · os-sales · session_01L6bhgWpxtdkmztBUeYCva3
Fixes #35417
Clause-②: yes (widening) — @object-ui/i18n adds
console.firstRunChecklist.showDoneSplit; nothing removed
Metadata-protocol: none
## 维护者速读
- 管理员在首页看到的「完成初始设置」卡片:已完成数与进度不再对不上,文案里的英文 Setup
换成各语言的「系统设置」叫法,只剩一两项时整张卡收成一行。
- 属于「控制台核心业务操作体验」专题,解决首页初始设置清单数字矛盾、中英混杂、少量剩余项仍占首屏的问题。
- 出错时只影响管理员首页这张清单的显示,不改任何设置、不写数据,可直接撤回。
- 无
## What changes
1. **Done count matches the progress line.** The progress line counts
the required rows alone (optional rows are kept out by the existing
mail-optional ruling); the control that unfolds the done rows counted
every done row, so a managed environment read "6 of 7 done" above "Show
completed (8)". A new pure function `checklistDoneCount` in
`firstRunChecklistLogic.ts` splits the done rows into required and
optional. Once an optional row is done the control reads "Show completed
(6 required · 2 optional)" (zh 「显示已完成的项(必做 6 · 可选 2)」); with none done
it reads as before ("Show completed (6)"). New key
`console.firstRunChecklist.showDoneSplit` in all eleven packs,
translated.
2. **No English "Setup" in the checklist copy.** The three checklist
strings that named Setup (`description`, `aiProvider.doneSettings`,
`connectAssistant.todo`) now use the Setup app's own translated label
from platform-objects' app translations: zh-Hans 系统设置, zh-Hant 系統設定, ja
セットアップ, ko 설정, es Configuración, pt-BR Configuração, fr Configuration,
ru Настройка (as «в разделе «Настройка»»), ar الإعداد. en and de keep
"Setup", which is their label. No other "Setup" in the locale files is
touched.
3. **One line when two rows or fewer are left.** Above the page (`top`
placement), when `drawsOneLine` holds (1 or 2 drawn rows not done,
optional included), the card draws one line: title, progress, each
remaining row's title with a Set button, and the close button; no
description, no done rows, no unfold control. It wraps (flex-wrap) at
narrow widths. A localization row's Set opens the full card with that
row's editor (`setEditing`), and the card folds back to the line when
the editor closes (Cancel or a confirmed save). Every other row's Set
opens the page its row already links to. The phone placement
(`afterApps`) keeps its own fold, unchanged. No row, completion rule or
write changes. The module docblock describes the one-line form.
## Tests
<details><summary>Console checklist suites (3 files)</summary>
`pnpm --dir ui exec vitest run` on `FirstRunChecklist.test.tsx`,
`firstRunChecklistLogic.test.ts`, `firstRunChecklistProfile.test.ts`:
Test Files 3 passed (3), Tests 109 passed (109), at d173c3c.
New top-level describes in the shared harness
`FirstRunChecklist.test.tsx`:
- done control counts required and optional apart: managed, two optional
done, "3 of 6 done" with "Show completed (3 required · 2 optional)" and
the zh form; CONTROL self-hosted with no optional done keeps "Show
completed (2)".
- one-line form: one row left draws title, progress, the row and its
Set, the close button, with no description, no toggle and no detail
line; Set opens the full card with the editor and Cancel folds it back;
two rows left with a link row (href kept, label Set) and close hides it;
CONTROL three rows left draws the full card; CONTROL phone placement
keeps its fold; zh label.
- locale pin: every non-en/de pack's three strings carry its Setup label
and no "Setup"; the pack roster is asserted complete; CONTROL en/de keep
"Setup".
Logic file: `checklistDoneCount` on the managed 6-of-7 + 2-optional case
(progress 6/7, count 6 + 2) with a CONTROL; `drawsOneLine` at 1, 2, 3
and 0 rows left.
</details>
<details><summary>Ablations (committed fix first, restored by blob
hash)</summary>
- `drawsOneLine` body replaced by `return false;`
(scripts/ablation-replace.mjs, anchor 1 to 0, blob 25f225b to
25e09c72b936): 4 failed, 96 passed; restored, blob equals HEAD, `git
diff HEAD` empty.
- the split branch condition `: doneCount.optional > 0` replaced by `:
false`: 1 failed (the managed split pin), 73 passed; restored, blob
equals HEAD.
</details>
<details><summary>Wider console and i18n runs</summary>
- The six console App/FormPage suites that mount the checklist, plus all
of `apps/console/src/pages/settings/`: Test Files 49 passed (49), Tests
483 passed (483).
- `pnpm --filter @object-ui/i18n type-check` and `pnpm --dir ui exec
vitest run packages/i18n/` (includes all-locales key parity): Test Files
105 passed (105), Tests 1957 passed, 13 skipped.
- `pnpm --filter @object-ui/console type-check`: exit 0, 0 errors (the
console tsconfig lists both edited test files).
- eslint over the 4 console files and the 11 locale packs: 18 files, 0
errors, 0 warnings.
</details>
## Acceptance notes
- The one-line form's Set label is `console.firstRunChecklist.set` for
every row, as the card asks ("项名 + 「设置」按钮"), so a link row such as
Invite colleagues reads Set there and keeps its own action label in the
full card.
- The one-line form shows the Optional mark next to an optional row (for
example mail), so a reader is not told an optional row is required.
- The one-line state is derived, not stored: a Set on a localization row
opens the full card only while its editor is open.
- No before/after screenshot was taken.
## Verification
Read first: `FirstRunChecklist.tsx` (the one-line branch before the full
card, and the done toggle label), `firstRunChecklistLogic.ts`
(`checklistDoneCount`, `drawsOneLine`), the zh-Hans pack's
`firstRunChecklist` block.
Two-minute check: run `pnpm --dir ui exec vitest run
apps/console/src/pages/settings/__tests__/FirstRunChecklist.test.tsx`;
expect all tests passed, including the "folds to one line" and "its own
label" describes.
<details><summary>Local gates at d173c3c</summary>
`node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--ran`: 41 derived families accounted for, 41 run, 0 NOT-MEASURED (a
derived zero, every one with exit 0). `pnpm --dir ui exec vitest run
scripts/` was OOM-killed once beside a locked run and rerun under the
verification lock with 2 workers: 172 files passed, 2 skipped. `pnpm
--dir ui check:new-line-citations`: 0 new citations. `node
scripts/pm/overlap-check.mjs`: clean against origin/main b113178 and 4
open PRs sharing the locale packs. CI families: not yet reported at
open.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgWpxtdkmztBUeYCva3
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgWpxtdkmztBUeYCva3 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 141a826 commit 9b3227f
16 files changed
Lines changed: 434 additions & 43 deletions
File tree
- .changeset
- ui
- apps/console/src/pages/settings
- __tests__
- packages/i18n/src/locales
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
99 | 110 | | |
100 | 111 | | |
101 | 112 | | |
| |||
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
| 164 | + | |
153 | 165 | | |
154 | 166 | | |
| 167 | + | |
155 | 168 | | |
156 | 169 | | |
157 | 170 | | |
| |||
460 | 473 | | |
461 | 474 | | |
462 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
463 | 489 | | |
464 | 490 | | |
465 | 491 | | |
| |||
607 | 633 | | |
608 | 634 | | |
609 | 635 | | |
610 | | - | |
| 636 | + | |
611 | 637 | | |
| 638 | + | |
612 | 639 | | |
613 | 640 | | |
614 | 641 | | |
| 642 | + | |
| 643 | + | |
615 | 644 | | |
616 | 645 | | |
617 | 646 | | |
| |||
626 | 655 | | |
627 | 656 | | |
628 | 657 | | |
629 | | - | |
| 658 | + | |
630 | 659 | | |
631 | 660 | | |
632 | 661 | | |
| |||
640 | 669 | | |
641 | 670 | | |
642 | 671 | | |
| 672 | + | |
| 673 | + | |
643 | 674 | | |
644 | 675 | | |
645 | 676 | | |
| |||
701 | 732 | | |
702 | 733 | | |
703 | 734 | | |
| 735 | + | |
| 736 | + | |
704 | 737 | | |
705 | 738 | | |
706 | 739 | | |
| |||
725 | 758 | | |
726 | 759 | | |
727 | 760 | | |
| 761 | + | |
| 762 | + | |
728 | 763 | | |
729 | 764 | | |
730 | 765 | | |
| |||
751 | 786 | | |
752 | 787 | | |
753 | 788 | | |
| 789 | + | |
| 790 | + | |
754 | 791 | | |
755 | 792 | | |
756 | 793 | | |
| |||
786 | 823 | | |
787 | 824 | | |
788 | 825 | | |
| 826 | + | |
| 827 | + | |
789 | 828 | | |
790 | 829 | | |
791 | 830 | | |
| |||
816 | 855 | | |
817 | 856 | | |
818 | 857 | | |
| 858 | + | |
819 | 859 | | |
820 | 860 | | |
821 | 861 | | |
| |||
834 | 874 | | |
835 | 875 | | |
836 | 876 | | |
| 877 | + | |
| 878 | + | |
837 | 879 | | |
838 | 880 | | |
839 | 881 | | |
| |||
861 | 903 | | |
862 | 904 | | |
863 | 905 | | |
864 | | - | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
865 | 909 | | |
866 | 910 | | |
867 | 911 | | |
| |||
872 | 916 | | |
873 | 917 | | |
874 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
875 | 999 | | |
876 | 1000 | | |
877 | 1001 | | |
| |||
938 | 1062 | | |
939 | 1063 | | |
940 | 1064 | | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
| 1065 | + | |
951 | 1066 | | |
952 | 1067 | | |
953 | 1068 | | |
954 | 1069 | | |
955 | 1070 | | |
956 | | - | |
| 1071 | + | |
957 | 1072 | | |
958 | 1073 | | |
959 | 1074 | | |
| |||
970 | 1085 | | |
971 | 1086 | | |
972 | 1087 | | |
973 | | - | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
974 | 1091 | | |
975 | 1092 | | |
976 | 1093 | | |
| |||
0 commit comments