@tstax/coding-tab 0.2.0 → 0.2.2

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/dist/style.css CHANGED
@@ -19,10 +19,14 @@
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  height: 100%;
22
- min-height: 480px;
22
+ min-height: 0;
23
+ min-width: 0;
23
24
  border-radius: var(--ct-radius);
24
25
  overflow: hidden;
25
26
  border: 1px solid var(--ct-border);
27
+ /* iOS Safari sometimes needs an explicit minimum so the inner thread can
28
+ shrink to viewport width when embedded inside a flex container. */
29
+ max-width: 100%;
26
30
  }
27
31
  @media (prefers-color-scheme: light) {
28
32
  .coding-tab {
@@ -48,6 +52,7 @@
48
52
  border-bottom: 1px solid var(--ct-border);
49
53
  background: var(--ct-bg-alt);
50
54
  flex-wrap: wrap;
55
+ min-width: 0;
51
56
  }
52
57
  .coding-tab__header select,
53
58
  .coding-tab__header input,
@@ -66,12 +71,14 @@
66
71
  align-items: center;
67
72
  justify-content: center;
68
73
  padding: 4px 7px;
74
+ flex-shrink: 0;
69
75
  }
70
76
  .coding-tab__mode {
71
77
  display: inline-flex;
72
78
  border: 1px solid var(--ct-border);
73
79
  border-radius: 6px;
74
80
  overflow: hidden;
81
+ flex-shrink: 0;
75
82
  }
76
83
  .coding-tab__mode button {
77
84
  border: 0;
@@ -98,6 +105,7 @@
98
105
  font-size: 0.92em;
99
106
  flex: 0 1 auto;
100
107
  min-width: 0;
108
+ max-width: 100%;
101
109
  }
102
110
  .coding-tab__repo-locked:hover { border-color: var(--ct-accent); color: var(--ct-fg); }
103
111
  .coding-tab__repo-locked span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -108,8 +116,10 @@
108
116
  display: flex;
109
117
  align-items: center;
110
118
  gap: 8px;
119
+ min-width: 0;
111
120
  }
112
- .coding-tab__user img { width: 22px; height: 22px; border-radius: 50%; }
121
+ .coding-tab__user img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
122
+ .coding-tab__user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
113
123
  .coding-tab__user button {
114
124
  background: transparent;
115
125
  border: 0;
@@ -117,6 +127,7 @@
117
127
  cursor: pointer;
118
128
  padding: 2px 6px;
119
129
  border-radius: 4px;
130
+ flex-shrink: 0;
120
131
  }
121
132
  .coding-tab__user button:hover { color: var(--ct-fg); background: var(--ct-bg); }
122
133
 
@@ -125,6 +136,8 @@
125
136
  flex: 1;
126
137
  display: flex;
127
138
  min-height: 0;
139
+ min-width: 0;
140
+ position: relative;
128
141
  }
129
142
  .coding-tab__sidebar {
130
143
  width: 240px;
@@ -134,6 +147,7 @@
134
147
  border-right: 1px solid var(--ct-border);
135
148
  background: var(--ct-bg-alt);
136
149
  overflow: hidden;
150
+ min-width: 0;
137
151
  }
138
152
  .coding-tab__new-chat {
139
153
  display: inline-flex;
@@ -149,6 +163,7 @@
149
163
  display: flex;
150
164
  flex-direction: column;
151
165
  gap: 2px;
166
+ min-width: 0;
152
167
  }
153
168
  .coding-tab__chat-empty {
154
169
  font-size: 12px;
@@ -162,6 +177,7 @@
162
177
  border-radius: 6px;
163
178
  overflow: hidden;
164
179
  transition: background 0.1s;
180
+ min-width: 0;
165
181
  }
166
182
  .coding-tab__chat-row:hover { background: var(--ct-bg-row); }
167
183
  .coding-tab__chat-row.is-active { background: var(--ct-bg-row); }
@@ -205,6 +221,7 @@
205
221
  align-items: center;
206
222
  padding-right: 6px;
207
223
  gap: 2px;
224
+ flex-shrink: 0;
208
225
  }
209
226
  .coding-tab__chat-row:hover .coding-tab__chat-row-actions,
210
227
  .coding-tab__chat-row.is-active .coding-tab__chat-row-actions {
@@ -227,8 +244,14 @@
227
244
  flex: 1;
228
245
  display: flex;
229
246
  flex-direction: column;
247
+ /* CRITICAL: without this, any wide child (long URL in tool args, code block,
248
+ overflowing pre) blows out the flex container width and forces the whole
249
+ thread to scroll horizontally — making text wrap word-by-word in the tiny
250
+ visible strip. */
230
251
  min-width: 0;
252
+ min-height: 0;
231
253
  background: var(--ct-bg);
254
+ overflow: hidden;
232
255
  }
233
256
  .coding-tab__pane-empty {
234
257
  margin: auto;
@@ -257,20 +280,46 @@
257
280
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3);
258
281
  }
259
282
  .coding-tab__sidebar.is-open { transform: translateX(0); }
260
- .coding-tab__body { position: relative; }
283
+ /* Compact the repo pill to icon-only on mobile keeps the one-tap link to
284
+ GitHub (so users can open PRs themselves) without crowding the header. */
285
+ .coding-tab__repo-locked {
286
+ padding: 6px 8px;
287
+ border-radius: 6px;
288
+ flex-shrink: 0;
289
+ }
290
+ .coding-tab__repo-locked span { display: none; }
291
+ /* Collapse the user block to just avatar + sign-out, drop the @login text. */
292
+ .coding-tab__user-name { display: none; }
293
+ .coding-tab__user { gap: 4px; }
294
+ .coding-tab__header { gap: 6px; padding: 6px 10px; }
295
+ .coding-tab__header select { max-width: 130px; }
296
+ }
297
+
298
+ @media (max-width: 480px) {
299
+ .coding-tab__user img { display: none; }
300
+ .coding-tab__user button { padding: 4px 8px; font-size: 11px; }
261
301
  }
262
302
 
263
303
  /* ───────── thread / messages ───────── */
264
304
  .coding-tab__thread {
265
305
  flex: 1;
266
306
  overflow-y: auto;
307
+ overflow-x: hidden;
308
+ -webkit-overflow-scrolling: touch;
267
309
  padding: 16px;
268
310
  display: flex;
269
311
  flex-direction: column;
270
312
  gap: 14px;
313
+ min-width: 0;
271
314
  }
272
315
 
273
- .coding-tab__msg { display: flex; flex-direction: column; gap: 4px; }
316
+ .coding-tab__msg {
317
+ display: flex;
318
+ flex-direction: column;
319
+ gap: 4px;
320
+ min-width: 0;
321
+ max-width: 100%;
322
+ }
274
323
  .coding-tab__msg-role {
275
324
  font-size: 11px;
276
325
  text-transform: uppercase;
@@ -283,9 +332,12 @@
283
332
  border-radius: 8px;
284
333
  padding: 10px 12px;
285
334
  word-wrap: break-word;
335
+ overflow-wrap: anywhere;
286
336
  display: flex;
287
337
  flex-direction: column;
288
338
  gap: 8px;
339
+ min-width: 0;
340
+ max-width: 100%;
289
341
  }
290
342
  .coding-tab__msg.user .coding-tab__msg-body {
291
343
  background: var(--ct-accent);
@@ -295,6 +347,7 @@
295
347
  max-width: 85%;
296
348
  white-space: pre-wrap;
297
349
  display: block;
350
+ word-break: break-word;
298
351
  }
299
352
  .coding-tab__msg.user { align-items: flex-end; }
300
353
  .coding-tab__msg-pending {
@@ -302,8 +355,14 @@
302
355
  font-style: italic;
303
356
  }
304
357
 
358
+ @media (max-width: 720px) {
359
+ .coding-tab__thread { padding: 12px; gap: 12px; }
360
+ .coding-tab__msg-body { padding: 9px 11px; }
361
+ .coding-tab__msg.user .coding-tab__msg-body { max-width: 92%; }
362
+ }
363
+
305
364
  /* ───────── markdown ───────── */
306
- .coding-tab__md { display: block; }
365
+ .coding-tab__md { display: block; min-width: 0; max-width: 100%; }
307
366
  .coding-tab__md > * + * { margin-top: 8px; }
308
367
  .coding-tab__md p { margin: 0; }
309
368
  .coding-tab__md h1,
@@ -313,6 +372,7 @@
313
372
  margin: 4px 0 4px;
314
373
  font-weight: 600;
315
374
  line-height: 1.25;
375
+ word-break: break-word;
316
376
  }
317
377
  .coding-tab__md h1 { font-size: 1.3em; }
318
378
  .coding-tab__md h2 { font-size: 1.18em; border-bottom: 1px solid var(--ct-border); padding-bottom: 4px; }
@@ -340,6 +400,7 @@
340
400
  border-radius: 4px;
341
401
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
342
402
  font-size: 0.9em;
403
+ word-break: break-word;
343
404
  }
344
405
  .coding-tab__md pre {
345
406
  background: rgba(127, 127, 127, 0.12);
@@ -347,18 +408,23 @@
347
408
  border-radius: 6px;
348
409
  padding: 10px 12px;
349
410
  margin: 0;
411
+ max-width: 100%;
350
412
  overflow-x: auto;
413
+ -webkit-overflow-scrolling: touch;
351
414
  }
352
415
  .coding-tab__md pre code {
353
416
  background: transparent;
354
417
  padding: 0;
355
418
  font-size: 0.88em;
356
419
  line-height: 1.45;
420
+ word-break: normal;
421
+ white-space: pre;
357
422
  }
358
423
  .coding-tab__md a {
359
424
  color: var(--ct-accent);
360
425
  text-decoration: underline;
361
426
  text-underline-offset: 2px;
427
+ word-break: break-all;
362
428
  }
363
429
 
364
430
  /* ───────── tool calls (expandable) ───────── */
@@ -369,6 +435,8 @@
369
435
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
370
436
  font-size: 12px;
371
437
  overflow: hidden;
438
+ min-width: 0;
439
+ max-width: 100%;
372
440
  }
373
441
  .coding-tab__tool-header {
374
442
  width: 100%;
@@ -382,6 +450,7 @@
382
450
  cursor: pointer;
383
451
  text-align: left;
384
452
  font: inherit;
453
+ min-width: 0;
385
454
  }
386
455
  .coding-tab__tool-header:hover { background: rgba(127, 127, 127, 0.08); }
387
456
  .coding-tab__tool-dot {
@@ -414,6 +483,7 @@
414
483
  overflow: hidden;
415
484
  text-overflow: ellipsis;
416
485
  min-width: 0;
486
+ flex: 1 1 auto;
417
487
  }
418
488
  .coding-tab__tool-detail {
419
489
  padding: 8px 12px 10px;
@@ -422,8 +492,10 @@
422
492
  flex-direction: column;
423
493
  gap: 8px;
424
494
  background: rgba(127, 127, 127, 0.04);
495
+ min-width: 0;
496
+ max-width: 100%;
425
497
  }
426
- .coding-tab__tool-section { display: flex; flex-direction: column; gap: 4px; }
498
+ .coding-tab__tool-section { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
427
499
  .coding-tab__tool-label {
428
500
  font-size: 10px;
429
501
  letter-spacing: 0.05em;
@@ -437,9 +509,14 @@
437
509
  border: 1px solid var(--ct-border);
438
510
  border-radius: 4px;
439
511
  max-height: 360px;
512
+ max-width: 100%;
440
513
  overflow: auto;
514
+ -webkit-overflow-scrolling: touch;
515
+ /* Wrap long lines within the visible width so they don't push the parent
516
+ wider on mobile; horizontal scroll still works for monolithic code. */
441
517
  white-space: pre-wrap;
442
518
  word-break: break-word;
519
+ overflow-wrap: anywhere;
443
520
  font-size: 11px;
444
521
  line-height: 1.4;
445
522
  }
@@ -451,6 +528,13 @@
451
528
  font-style: italic;
452
529
  }
453
530
 
531
+ @media (max-width: 720px) {
532
+ .coding-tab__tool { font-size: 11.5px; }
533
+ .coding-tab__tool-header { padding: 7px 8px; gap: 6px; }
534
+ .coding-tab__tool-detail { padding: 6px 8px 8px; }
535
+ .coding-tab__tool-detail pre { max-height: 240px; padding: 6px 8px; font-size: 10.5px; }
536
+ }
537
+
454
538
  @keyframes ct-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
455
539
 
456
540
  /* ───────── plan + PR + composer ───────── */
@@ -458,6 +542,7 @@
458
542
  display: flex;
459
543
  gap: 8px;
460
544
  margin-top: 4px;
545
+ flex-wrap: wrap;
461
546
  }
462
547
  .coding-tab__btn {
463
548
  font: inherit;
@@ -470,11 +555,30 @@
470
555
  display: inline-flex;
471
556
  align-items: center;
472
557
  gap: 6px;
558
+ position: relative;
559
+ transition: opacity 0.15s, background 0.15s, border-color 0.15s;
473
560
  }
474
561
  .coding-tab__btn:hover { border-color: var(--ct-accent); }
475
562
  .coding-tab__btn.primary { background: var(--ct-accent); color: var(--ct-accent-fg); border-color: transparent; }
476
563
  .coding-tab__btn.danger { color: var(--ct-danger); }
477
- .coding-tab__btn:disabled { opacity: 0.5; cursor: not-allowed; }
564
+ .coding-tab__btn.success { background: var(--ct-success); color: var(--ct-accent-fg); border-color: transparent; }
565
+ .coding-tab__btn:disabled { opacity: 0.6; cursor: not-allowed; }
566
+ .coding-tab__btn[data-state="loading"] { padding-left: 30px; }
567
+ .coding-tab__btn[data-state="loading"]::before {
568
+ content: "";
569
+ position: absolute;
570
+ left: 12px; top: 50%;
571
+ width: 12px; height: 12px;
572
+ margin-top: -6px;
573
+ border: 2px solid currentColor;
574
+ border-right-color: transparent;
575
+ border-radius: 50%;
576
+ animation: ct-spin 0.7s linear infinite;
577
+ opacity: 0.85;
578
+ }
579
+ @keyframes ct-spin {
580
+ to { transform: rotate(360deg); }
581
+ }
478
582
 
479
583
  .coding-tab__pr {
480
584
  margin-top: 4px;
@@ -485,12 +589,42 @@
485
589
  display: flex;
486
590
  flex-direction: column;
487
591
  gap: 8px;
592
+ min-width: 0;
593
+ max-width: 100%;
488
594
  }
489
595
  .coding-tab__pr-title {
490
596
  font-weight: 600;
491
597
  display: flex;
492
598
  align-items: center;
493
599
  gap: 6px;
600
+ flex-wrap: wrap;
601
+ word-break: break-word;
602
+ }
603
+ .coding-tab__pr-actions {
604
+ display: flex;
605
+ gap: 8px;
606
+ flex-wrap: wrap;
607
+ }
608
+ .coding-tab__pr-status {
609
+ font-size: 12px;
610
+ color: var(--ct-fg-dim);
611
+ font-style: italic;
612
+ }
613
+ .coding-tab__pr-status.is-success { color: var(--ct-success); font-style: normal; }
614
+ .coding-tab__pr-status.is-error { color: var(--ct-danger); font-style: normal; }
615
+
616
+ /* Branch fallback card — shown when commits were pushed but Cursor's auto-PR
617
+ tool didn't open a PR. Visually distinct from a real PR card so the user
618
+ sees the difference at a glance. */
619
+ .coding-tab__pr--branch {
620
+ border-style: dashed;
621
+ background: rgba(255, 159, 67, 0.06);
622
+ }
623
+ .coding-tab__pr--branch .coding-tab__pr-title code {
624
+ background: rgba(127, 127, 127, 0.18);
625
+ padding: 1px 6px;
626
+ border-radius: 4px;
627
+ font-size: 12px;
494
628
  }
495
629
 
496
630
  .coding-tab__composer {
@@ -499,9 +633,11 @@
499
633
  padding: 10px 12px;
500
634
  border-top: 1px solid var(--ct-border);
501
635
  background: var(--ct-bg-alt);
636
+ min-width: 0;
502
637
  }
503
638
  .coding-tab__composer textarea {
504
639
  flex: 1;
640
+ min-width: 0;
505
641
  min-height: 44px;
506
642
  max-height: 200px;
507
643
  resize: vertical;
@@ -512,7 +648,13 @@
512
648
  border-radius: 6px;
513
649
  padding: 8px 10px;
514
650
  }
515
- .coding-tab__composer button { align-self: flex-end; }
651
+ .coding-tab__composer button { align-self: flex-end; flex-shrink: 0; }
652
+
653
+ @media (max-width: 720px) {
654
+ .coding-tab__composer { padding: 8px 10px; gap: 6px; }
655
+ .coding-tab__composer textarea { font-size: 16px; /* iOS won't auto-zoom inputs >= 16px */ }
656
+ .coding-tab__btn { padding: 7px 12px; }
657
+ }
516
658
 
517
659
  /* ───────── sign in / notices ───────── */
518
660
  .coding-tab__signin {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstax/coding-tab",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Drop-in Cursor-style coding agent tab for any Express app. Multiple persistent chats, plan/agent modes, in-line tool inspection, GitHub OAuth, opens PRs against your repo via the Cursor SDK cloud runtime.",
5
5
  "type": "module",
6
6
  "exports": {