command-code 0.40.16 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "command-code",
3
- "version": "0.40.16",
3
+ "version": "0.41.0",
4
4
  "description": "Command Code, coding agent that continuously learns your coding taste",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -324,6 +324,8 @@ You're not making it "work on mobile." You're orchestrating the same story on di
324
324
  - **Container queries are the next decade.** Components should respond to their container, not the page. The same `<Card>` adapts in a sidebar (narrow), in main content (medium), and in a wide split-view (full).
325
325
  - **Adapt the interface, never amputate the feature.** "Not available on mobile" is a bug.
326
326
  - **Notch handling via `env(safe-area-inset-*)` and `viewport-fit=cover`.**
327
+ - **Direction is a layout input, not a CSS afterthought.** Build with logical properties (`start`/`end`, not `left`/`right`) so `dir="rtl"` renders Arabic, Hebrew, Farsi, and Urdu correctly. Mirror icons that encode reading direction (back arrows, chevrons); leave universal icons (play, checkmark, brand mark) alone. Full guidance: [references/responsive.md](references/responsive.md#text-direction).
328
+ - **iOS Safari input zoom:** Any `input`, `select`, or `textarea` with font-size below 16px triggers automatic viewport zoom on focus, breaking layout. Form elements need at least `1rem` on screens under 640px. Never use `maximum-scale=1` to suppress it — that disables pinch-to-zoom for all users. Full guidance: [references/responsive.md](references/responsive.md#ios-safari-input-zoom).
327
329
 
328
330
  ### Copy is Voice
329
331
 
@@ -58,7 +58,7 @@ I look at six vital signs.
58
58
 
59
59
  **Usability**: Can the primary task be completed with the available controls?
60
60
 
61
- **Responsiveness**: Does the surface adapt across width, input mode, zoom, and safe areas?
61
+ **Responsiveness**: Does the surface adapt across width, input mode, zoom, safe areas, and text direction (RTL renders correctly where the product supports it)? On narrow screens, do all `input`, `select`, and `textarea` elements use at least 16px font-size (sub-16px triggers iOS Safari auto-zoom on focus)? Fix guidance: [responsive.md](responsive.md#ios-safari-input-zoom).
62
62
 
63
63
  **Speed**: Does it load and respond without visible hesitation, shift, or jank?
64
64
 
@@ -116,7 +116,7 @@ I don't ask about these. I just decide:
116
116
  - Micro-timing on every interaction
117
117
  - Empty state copy, error message tone, loading indicator choice
118
118
  - Which reference files to pull
119
- - How to handle edge cases — long strings, zero items, overflow, RTL
119
+ - How to handle edge cases — long strings, zero items, overflow, RTL (see [responsive.md](responsive.md#text-direction) if the brief names a right-to-left locale)
120
120
  - Whether a motion adds clarity or just noise
121
121
 
122
122
  If I'm unsure on a style call, I pick the stronger option and move forward.
@@ -76,6 +76,8 @@ I do not polish the happy path while the edge states rot.
76
76
 
77
77
  **Mobile behavior** that does not crush, hide, or overflow.
78
78
 
79
+ **iOS Safari input zoom**: every `input`, `select`, and `textarea` uses at least `1rem` (16px) font-size on narrow screens, a sub-16px form element triggers iOS Safari auto-zoom on focus, breaking layout. Fix guidance: [responsive.md](responsive.md#ios-safari-input-zoom).
80
+
79
81
  **Performance feel**: no obvious shift, lag, oversized media, or janky motion.
80
82
 
81
83
  **Copy** that is specific, calm, and consistent.
@@ -146,6 +148,7 @@ The report does not decide for me. It points to places I should verify.
146
148
  - Performance feels stable
147
149
  - Nothing obvious makes me wince
148
150
  - The remaining issues, if any, are explicit tradeoffs, not neglected details
151
+ - Form inputs use at least 16px font-size on mobile — iOS Safari auto-zoom does not fire on focus
149
152
 
150
153
  STRICT RULE — NEVER BREAK THIS
151
154
  Do not create report.md, any kind of report, summary, analysis file,
@@ -87,6 +87,14 @@ If a feature only exists on hover, it does not exist for touch users.
87
87
 
88
88
  ---
89
89
 
90
+ ## Direction-Aware Controls
91
+
92
+ On a product that supports RTL languages, controls that encode reading direction must mirror: back/forward navigation, chevrons, breadcrumbs, carousels, swipe-to-dismiss, and drag handles aligned to text flow. Controls with universal meaning do not: play/pause, checkmarks, the brand mark, media scrubbers.
93
+
94
+ I check this with the actual `dir="rtl"` rendering, not by eyeballing the LTR version. Logical sizing and spacing belong in layout; see [responsive.md](responsive.md#text-direction).
95
+
96
+ ---
97
+
90
98
  ## Keyboard Path
91
99
 
92
100
  A complete keyboard path is a product feature.
@@ -105,6 +113,8 @@ Labels stay visible. Placeholders show examples, not identity. Required fields a
105
113
 
106
114
  Every error answers what happened and how to recover. Blame is forbidden.
107
115
 
116
+ On mobile, I verify every `input`, `select`, and `textarea` uses a font-size of at least 16px. A sub-16px form element triggers iOS Safari auto-zoom on focus, shifting layout and forcing the user to pinch back — it breaks the interaction, not just the visuals. Fix guidance and the specificity gotcha: [responsive.md](responsive.md#ios-safari-input-zoom).
117
+
108
118
  ---
109
119
 
110
120
  ## Overlays
@@ -161,6 +171,7 @@ Failure keeps the user's work. Recovery is visible. Retry is available when retr
161
171
  - Overlays close and return focus correctly
162
172
  - Form errors help without punishing
163
173
  - The interface feels responsive even during waits
174
+ - Form inputs on mobile use at least 16px font-size — no iOS Safari auto-zoom on focus
164
175
 
165
176
  STRICT RULE — NEVER BREAK THIS
166
177
  Do not create report.md, any kind of report, summary, analysis file,
@@ -138,6 +138,7 @@ Viewport rules still matter for page shell decisions. Component composition belo
138
138
  - Important content placed where the eye only finds it by accident
139
139
  - Testimonials, proof, or calls to action dropped in by formula
140
140
  - Horizontal overflow treated as a mobile detail
141
+ - Composition built only for left-to-right reading when the product needs to support RTL languages — see [responsive.md](responsive.md#text-direction)
141
142
 
142
143
  ---
143
144
 
@@ -118,7 +118,7 @@ I know it worked when the path is faster and the remaining elements feel inevita
118
118
 
119
119
  Proofing means the interface survives reality.
120
120
 
121
- I test long names, empty content, huge lists, extreme numbers, slow networks, offline states, permissions, rate limits, validation failures, concurrent actions, RTL, CJK, accents, emoji, and translated strings.
121
+ I test long names, empty content, huge lists, extreme numbers, slow networks, offline states, permissions, rate limits, validation failures, concurrent actions, RTL (see [responsive.md](responsive.md#text-direction)), CJK, accents, emoji, and translated strings.
122
122
 
123
123
  I expect German to expand. I expect a user to click twice. I expect the API to fail. I expect a tiny screen and a huge one. I expect data to be missing.
124
124
 
@@ -98,6 +98,42 @@ Stylus and hybrid devices need both touch generosity and pointer precision.
98
98
 
99
99
  ---
100
100
 
101
+ ## iOS Safari Input Zoom
102
+
103
+ On iOS Safari, focusing any `input`, `select`, or `textarea` with a font-size below 16px triggers an automatic viewport zoom. The page widens, horizontal scroll appears, and the user must pinch back to normal. This is a silent layout break.
104
+
105
+ I check all form elements at the narrow breakpoint. If font-size is below `1rem` (16px) on screens under 640px, I flag it and correct it.
106
+
107
+ **Specificity warning:** A bare type-selector rule like `input { font-size: 1rem }` loses to any utility class (e.g. Tailwind's `text-sm`). A class selector has higher specificity (0,1,0) than a type selector (0,0,1), so the computed font size remains 14px and iOS Safari still auto-zooms. A rule that does not win the cascade is not a fix.
108
+
109
+ **Fix — replace the utility with a responsive variant:**
110
+
111
+ In Tailwind, swap `text-sm` for `text-base sm:text-sm` on every affected form element. The mobile breakpoint stays at 16px; desktop keeps 14px. No global CSS needed, no specificity fight.
112
+
113
+ ```html
114
+ <!-- before -->
115
+ <input class="text-sm" />
116
+
117
+ <!-- after -->
118
+ <input class="text-base sm:text-sm" />
119
+ ```
120
+
121
+ In vanilla CSS projects with no utility classes, a plain media query works because nothing is fighting the type selector:
122
+
123
+ ```css
124
+ @media (max-width: 639px) {
125
+ input, select, textarea {
126
+ font-size: 1rem;
127
+ }
128
+ }
129
+ ```
130
+
131
+ For third-party or generated components where the class cannot be changed, flag it as a component-level issue to address at the source. Do not reach for `!important` — it breaks the cascade and creates a specificity arms race.
132
+
133
+ Never use `maximum-scale=1` in the viewport meta tag — it disables pinch-to-zoom for all users, which is an accessibility failure.
134
+
135
+ ---
136
+
101
137
  ## Thumb Reach
102
138
 
103
139
  On phones, the bottom of the screen is easier to reach than the top. Primary actions belong where hands naturally operate. Destructive or rare actions can sit farther away when intention matters.
@@ -126,6 +162,18 @@ Safe areas matter. Fixed controls cannot sit under notches, rounded corners, bro
126
162
 
127
163
  ---
128
164
 
165
+ ## Text Direction
166
+
167
+ A product that ships Arabic, Hebrew, Farsi, or Urdu is not "the same layout, flipped by the browser." Direction is a layout input, the same as viewport or input mode.
168
+
169
+ I set `dir="rtl"` (or `dir="auto"` per field) at the right scope and build with logical CSS, not physical sides: `margin-inline-start/end`, `padding-inline-start/end`, `border-inline-start/end`, `inset-inline-start/end`, `text-align: start/end`. In Tailwind, that is `ms-/me-`, `ps-/pe-`, `border-s/border-e`, `start-/end-`, `text-start/text-end` instead of `ml-/mr-`, `pl-/pr-`, `border-l/border-r`, `left-/right-`, `text-left/text-right`. Flex and grid order, `justify-start/end`, and `divide-x` (paired with `rtl:divide-x-reverse`) follow direction automatically once the ancestor has `dir` set — I don't hand-mirror markup for these.
170
+
171
+ Not everything flips. Icons that encode reading direction — back/forward chevrons, reply/forward arrows, progress and breadcrumb arrows, drag handles aligned to text flow — mirror in RTL. Icons that encode a universal meaning — play, pause, checkmarks, the brand mark, a clock face, a video timeline scrubber, charts and graphs — stay fixed. Numerals, phone numbers, and embedded LTR content (code, URLs, Latin brand names) stay LTR even inside an RTL paragraph; that's what `dir="auto"` or a `<bdi>` wrapper is for, not a layout hack.
172
+
173
+ I test the actual rendered RTL surface, not just the LTR one with a mental flip. Mixed-direction text (an English product name inside an Arabic sentence), numerals in dates and prices, and long Arabic/Hebrew words at narrow widths are where this breaks first.
174
+
175
+ ---
176
+
129
177
  ## Responsive Type
130
178
 
131
179
  Product UI keeps predictable type scales. Brand display can be fluid. Body text remains readable, not theatrical.
@@ -157,6 +205,10 @@ I do not mix strategies randomly on the same table.
157
205
  - Safe-area ignorance on fixed bars
158
206
  - Device detection when feature detection is the real need
159
207
  - Fluid type in dense product UI because it seems modern
208
+ - Hardcoded `left`/`right`, `ml-`/`mr-`, `pl-`/`pr-` instead of logical start/end on a product that supports RTL languages
209
+ - Mirroring an icon that carries universal meaning (play, checkmark, brand mark) just because the page is RTL
210
+ - Input, select, or textarea elements with font-size below 16px on narrow screens — iOS Safari zooms the viewport on focus, breaking layout
211
+ - Using `maximum-scale=1` in the viewport meta tag to suppress iOS zoom — it disables pinch-to-zoom for all users
160
212
 
161
213
  ---
162
214
 
@@ -172,6 +224,8 @@ I do not mix strategies randomly on the same table.
172
224
  - Safe areas protect fixed controls
173
225
  - Dark, reduced-motion, high-contrast, and zoom states remain usable
174
226
  - Tables keep their data meaning
227
+ - RTL locales render mirrored where direction carries meaning and fixed where it doesn't, with logical CSS doing the work
228
+ - All input, select, and textarea elements use at least 16px font-size on narrow screens — no iOS Safari viewport zoom on focus
175
229
 
176
230
  STRICT RULE — NEVER BREAK THIS
177
231
  Do not create report.md, any kind of report, summary, analysis file,
Binary file