Commit 9f032cf
authored
fix(web): align next-step Design toolbox with the composer's action menu (#4096)
* fix(web): align next-step toolbox menu
* fix(web): share the design-toolbox action matcher across composer and next-step
The next-step submenu had its own action matcher that ignored the matched
skill's metadata, so searching by a preferred skill id/name (e.g.
emilkowalski-motion) showed the skill resource row while hiding the action
row it belongs to — the opposite of aligning with the composer panel.
Lift the matcher into runtime/design-toolbox.ts (skill-aware, the composer's
behavior) and use it from both surfaces; drop the two local copies. Regression
test: searching by a preferred skill id keeps the action row visible.
* fix(web): localize next-step toolbox resource matching and labels
The next-step submenu filtered/rendered global skill resources with raw
SkillSummary fields, so a localized query (e.g. zh-CN "创意总监") matched in
the composer but not here, and rows showed the raw skill id/name instead of
the localized title.
Thread the locale-resolved name/description into skillMatchesQuery via a new
optional `extra` argument and render localizeSkillName(locale, skill), so the
next-step resource list matches and labels the same way the composer does.
Regression test: a zh-CN query matches and renders the localized name.
* fix(web): thread localized skill text into the shared action matcher
Patch 3 taught the resource rows to match localized skill text, but the
shared designToolboxActionMatchesQuery still indexed only raw skill fields,
so a localized preferred-skill query (e.g. zh-CN) kept the resource row while
hiding its paired follow-up action on both surfaces.
Add an optional `extra` argument (parallel to skillMatchesQuery) and pass the
locale-resolved name/description from both the next-step submenu and the
composer panel. Regression test: a localized preferred-skill query keeps the
action row visible.1 parent e98e75f commit 9f032cf
6 files changed
Lines changed: 399 additions & 127 deletions
File tree
- apps/web
- src
- components
- runtime
- tests/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
| 355 | + | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
3359 | 3360 | | |
3360 | 3361 | | |
3361 | 3362 | | |
3362 | | - | |
3363 | | - | |
3364 | | - | |
3365 | | - | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
3366 | 3374 | | |
3367 | 3375 | | |
3368 | 3376 | | |
| |||
3947 | 3955 | | |
3948 | 3956 | | |
3949 | 3957 | | |
3950 | | - | |
3951 | | - | |
3952 | | - | |
3953 | | - | |
3954 | | - | |
3955 | | - | |
3956 | | - | |
3957 | | - | |
3958 | | - | |
3959 | | - | |
3960 | | - | |
3961 | | - | |
3962 | | - | |
3963 | | - | |
3964 | | - | |
3965 | | - | |
3966 | | - | |
3967 | | - | |
3968 | | - | |
3969 | | - | |
3970 | | - | |
3971 | | - | |
3972 | | - | |
3973 | 3958 | | |
3974 | 3959 | | |
3975 | 3960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
245 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | | - | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | | - | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
255 | 256 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | 257 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
277 | 261 | | |
278 | 262 | | |
279 | 263 | | |
280 | 264 | | |
281 | 265 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
286 | 271 | | |
| 272 | + | |
287 | 273 | | |
288 | 274 | | |
289 | 275 | | |
| |||
298 | 284 | | |
299 | 285 | | |
300 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
301 | 294 | | |
302 | 295 | | |
303 | 296 | | |
304 | 297 | | |
305 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
0 commit comments