Skip to content

Commit d4622dd

Browse files
authored
feat(setup-wizard): clearer written-files summary and org/user validation (#1272)
1 parent 468384d commit d4622dd

4 files changed

Lines changed: 343 additions & 13 deletions

File tree

packages/setupWizard/src/github.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ export async function collectGitHubConfig(connectionName: string): Promise<Colle
129129
if (targets.includes('repos')) {
130130
const ctx = createSearchSelectContext();
131131
const repos = await searchSelect<string, true>({
132-
message: 'Repositories to index (type to search, or type owner/repo)',
132+
message: 'Repositories to index (type to search, or type owner/repo, tab to select)',
133133
multiple: true,
134+
// The library's transient "(Press tab to select/deselect)" helptip is dropped once the
135+
// prompt is submitted, so the hint vanishes from completed prompts. We instead bake the
136+
// hint into the message (which persists) and disable the duplicate live helptip.
137+
instructions: false,
134138
required: true,
135139
loop: false,
136140
clearInputWhenSelected: true,
@@ -163,8 +167,9 @@ export async function collectGitHubConfig(connectionName: string): Promise<Colle
163167
if (targets.includes('orgs')) {
164168
const ctx = createSearchSelectContext();
165169
const orgs = await searchSelect<string, true>({
166-
message: 'Organizations to index (type to search)',
170+
message: 'Organizations to index (type to search, tab to select)',
167171
multiple: true,
172+
instructions: false,
168173
required: true,
169174
loop: false,
170175
clearInputWhenSelected: true,
@@ -189,8 +194,9 @@ export async function collectGitHubConfig(connectionName: string): Promise<Colle
189194
if (targets.includes('users')) {
190195
const ctx = createSearchSelectContext();
191196
const users = await searchSelect<string, true>({
192-
message: 'GitHub users to index (type to search)',
197+
message: 'GitHub users to index (type to search, tab to select)',
193198
multiple: true,
199+
instructions: false,
194200
required: true,
195201
loop: false,
196202
clearInputWhenSelected: true,

packages/setupWizard/src/gitlab.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ export async function collectGitLabConfig(connectionName: string): Promise<Colle
147147
if (targets.includes('groups')) {
148148
const ctx = createSearchSelectContext();
149149
const groups = await searchSelect<string, true>({
150-
message: 'Groups to index (type to search)',
150+
message: 'Groups to index (type to search, tab to select)',
151151
multiple: true,
152+
// See github.ts: bake the tab-to-select hint into the message so it persists on
153+
// completed prompts, and disable the library's transient (duplicate) helptip.
154+
instructions: false,
152155
required: true,
153156
loop: false,
154157
clearInputWhenSelected: true,
@@ -173,8 +176,9 @@ export async function collectGitLabConfig(connectionName: string): Promise<Colle
173176
if (targets.includes('projects')) {
174177
const ctx = createSearchSelectContext();
175178
const projects = await searchSelect<string, true>({
176-
message: 'Projects to index (type to search, or type group/project)',
179+
message: 'Projects to index (type to search, or type group/project, tab to select)',
177180
multiple: true,
181+
instructions: false,
178182
required: true,
179183
loop: false,
180184
clearInputWhenSelected: true,
@@ -207,8 +211,9 @@ export async function collectGitLabConfig(connectionName: string): Promise<Colle
207211
if (targets.includes('users')) {
208212
const ctx = createSearchSelectContext();
209213
const users = await searchSelect<string, true>({
210-
message: 'Users to index (type to search)',
214+
message: 'Users to index (type to search, tab to select)',
211215
multiple: true,
216+
instructions: false,
212217
required: true,
213218
loop: false,
214219
clearInputWhenSelected: true,

0 commit comments

Comments
 (0)