You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: drop ANSI from autocomplete titles (questionary HTML) (#207)
questionary wraps choice text in HTML for match highlighting; ANSI category
badges caused "not well-formed (invalid token)" while typing to search.
Co-authored-by: Cursor <cursoragent@cursor.com>
abbreviates long names to initials). Titles stay plain text because
116
+
`questionary.autocomplete` wraps choices in HTML for match highlighting — ANSI
117
+
or other markup raises XML parse errors in prompt_toolkit.
114
118
115
-
| Index | ANSI color | Typical use |
116
-
|-------|------------|-------------|
117
-
| 0 | yellow (`\033[33m`) | category badge |
118
-
| 1 | green (`\033[32m`) | category badge |
119
-
| 2 | cyan (`\033[36m`) | category badge |
120
-
| 3 | magenta (`\033[35m`) | category badge |
121
-
| 4 | blue (`\033[34m`) | category badge |
119
+
`--list-templates` uses Rich tables for color, not ANSI in choice strings.
122
120
123
-
Color selection: `sum(ord(char) for char in category_slug) % 5`. Respects `NO_COLOR` (plain text, no ANSI).
124
-
125
-
Badge label: compact form from `short_category_label()` (strips "Applications", "Application", "Boilerplate"; abbreviates long names to initials).
126
-
127
-
Design implication: terminal category colors are slug-hash-driven, not semantically mapped (e.g. "backend" is not always blue). A future brand system may want stable category-to-color mapping for docs and website cards.
121
+
Design implication: if terminal category color returns, prefer Rich styling or
122
+
a prompt library that does not HTML-parse choice titles (CNA uses `prompts` +
123
+
picocolors).
128
124
129
125
### Rich semantic color usage
130
126
@@ -195,7 +191,7 @@ The CLI experience is functional and CNA-aligned for catalog flows, but the broa
|`NO_COLOR`|Honored by Rich output (list tables, messages)|
414
410
|`CPA_CATALOG_URL`| Override catalog source |
415
411
|`CPA_NO_CATALOG_CACHE`| Force catalog refresh |
416
412
|`CPA_STRICT_VERSION`| Treat version mismatch as error |
@@ -424,7 +420,10 @@ We need to do a full UI/UX and branding review of the Create Python App ecosyste
424
420
425
421
Please start with discovery and audit before implementing. Review the root create-python-app repo, the package README, cpa-templates, and docs/BRAND.md. The goal is to improve engagement, attraction, branding, cozy developer experience, visual consistency, and conversion across GitHub, PyPI, docs, CLI, and generated starter UIs.
426
422
427
-
The CLI already uses Rich on stderr, questionary autocomplete/checkbox flows, and hash-based category badge colors from catalog.py. Evaluate whether those defaults should evolve into a cohesive brand system. Pay attention to error message tone, interactive vs CI non-interactive behavior, and the minimal hero SVG.
423
+
The CLI already uses Rich on stderr and questionary autocomplete/checkbox flows
424
+
with plain-text category badges (HTML-safe for prompt_toolkit). Evaluate whether
425
+
those defaults should evolve into a cohesive brand system. Pay attention to error
426
+
message tone, interactive vs CI non-interactive behavior, and the minimal hero SVG.
428
427
429
428
Previous work established basic READMEs and BRAND.md notes, but now I want a broader review and a stronger cohesive brand direction. Do not assume the current teal-on-slate hero or terminal colors are final.
0 commit comments