claude-plugin-viban 1.0.22 → 1.0.24

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/bin/viban CHANGED
@@ -98,7 +98,7 @@ EOF
98
98
 
99
99
  # Auto-initialize for commands that need data (not help/init)
100
100
  case "$1" in
101
- help|--help|-h|--version|-v|init) ;;
101
+ help|--help|-h|--version|-v|update|init) ;;
102
102
  *) init_viban_json ;;
103
103
  esac
104
104
 
@@ -356,18 +356,24 @@ get_term_height() {
356
356
  fi
357
357
  }
358
358
 
359
- # Get display width of string (Korean = 2, ASCII = 1)
360
- # Fully optimized: no subprocesses, pure zsh with LC_ALL=C trick
359
+ # Get display width of string using Unicode East Asian Width property
360
+ # F(Fullwidth) and W(Wide) = 2 columns, others = 1 column
361
361
  str_width() {
362
362
  local str="$1"
363
363
  local char_count=${#str}
364
- # Get byte count in C locale (UTF-8): CJK chars use 3 bytes each
365
364
  local byte_count
366
365
  LC_ALL=C byte_count=${#str}
367
- # Each CJK char adds 2 extra bytes (3 total - 1 for normal char = 2 extra)
368
- # Display width = ASCII count + (extra bytes / 2 for CJK chars)
369
- local multi_byte_chars=$(( (byte_count - char_count) / 2 ))
370
- echo $(( char_count + multi_byte_chars ))
366
+
367
+ # If all ASCII, simple calculation (fast path)
368
+ [[ $byte_count -eq $char_count ]] && { echo $char_count; return; }
369
+
370
+ # Use Python for accurate Unicode width calculation
371
+ # Note: <<< adds trailing newline, so we strip it with rstrip()
372
+ python3 -c "
373
+ import unicodedata, sys
374
+ s = sys.stdin.read().rstrip('\n')
375
+ print(sum(2 if unicodedata.east_asian_width(c) in 'FW' else 1 for c in s))
376
+ " <<< "$str"
371
377
  }
372
378
 
373
379
  # Truncate string to max display width (optimized)
@@ -502,8 +508,6 @@ build_column_lines() {
502
508
  local short=$(truncate_str "$title" $title_w)
503
509
  local title_content=" ${spinner_prefix}#$id $short"
504
510
  local title_content_w=$(str_width "$title_content")
505
- # Braille spinner chars are 3 bytes but display width 1, str_width overcounts by 1
506
- [[ -n "$spinner_prefix" ]] && title_content_w=$((title_content_w - 1))
507
511
  local title_pad=$((card_inner - title_content_w))
508
512
  (( title_pad < 0 )) && title_pad=0
509
513
 
@@ -970,12 +974,12 @@ TEMPLATE
970
974
  parse_stage=1
971
975
  ;;
972
976
  1) # Looking for type
973
- [[ -z "$line" ]] && continue # 줄은 무시하고 계속 대기
977
+ [[ -z "$line" ]] && continue # Skip empty lines
974
978
  # Validate type format (bug, feat, chore, refactor)
975
979
  if [[ "$line" =~ ^(bug|feat|chore|refactor)$ ]]; then
976
980
  new_type="$line"
977
981
  fi
978
- parse_stage=2 # type이든 아니든 비-빈 줄을 만났으면 stage 2로
982
+ parse_stage=2 # Move to stage 2 on any non-empty line
979
983
  ;;
980
984
  2) # Looking for title
981
985
  [[ -z "$line" ]] && continue
@@ -1284,6 +1288,15 @@ main() {
1284
1288
  echo "unknown"
1285
1289
  fi
1286
1290
  ;;
1291
+ update)
1292
+ # Silent update check - only updates if newer version available
1293
+ local current latest
1294
+ current=$(grep '"version"' "$VIBAN_SCRIPT_DIR/package.json" 2>/dev/null | sed 's/.*: *"\([^"]*\)".*/\1/')
1295
+ latest=$(npm show claude-plugin-viban version 2>/dev/null)
1296
+ [[ -z "$current" || -z "$latest" || "$current" == "$latest" ]] && exit 0
1297
+ echo "📦 Updating viban: $current → $latest"
1298
+ npm update -g claude-plugin-viban && echo "✓ Updated to $latest"
1299
+ ;;
1287
1300
  help|--help|-h)
1288
1301
  echo "viban - Vibe Kanban"
1289
1302
  echo ""
@@ -1298,6 +1311,7 @@ main() {
1298
1311
  echo " viban edit <id> Edit task in editor"
1299
1312
  echo " viban get <id> Get task details (JSON)"
1300
1313
  echo " viban migrate Migrate: extract type from title"
1314
+ echo " viban update Update to latest version (if available)"
1301
1315
  echo ""
1302
1316
  echo " Priority: P0=CRITICAL, P1=HIGH, P2=MEDIUM, P3=LOW"
1303
1317
  echo " Type: bug, feat, chore, refactor"
package/commands/task.md CHANGED
@@ -219,30 +219,12 @@ Location: src/pages/backtest/results.tsx
219
219
  ```
220
220
  - **Accurate Priority**: P0 only for system-down level, avoid over-estimation
221
221
 
222
- ## Final Step: Version Check & Update Prompt
222
+ ## Final Step: Auto Update Check
223
223
 
224
- After completing issue registration, check for viban updates:
224
+ After completing issue registration, run:
225
225
 
226
226
  ```bash
227
- CURRENT_VERSION=$(viban --version 2>/dev/null || echo "unknown")
228
- LATEST_VERSION=$(npm show claude-plugin-viban version 2>/dev/null || echo "unknown")
227
+ viban update
229
228
  ```
230
229
 
231
- If `CURRENT_VERSION` != `LATEST_VERSION`:
232
-
233
- ```
234
- 📦 viban update available: {CURRENT_VERSION} → {LATEST_VERSION}
235
- ```
236
-
237
- Use AskUserQuestion to ask:
238
- - "Update viban now?" with options: "Yes, update" / "Skip for now"
239
-
240
- If user chooses to update:
241
- ```bash
242
- npm update -g claude-plugin-viban
243
- ```
244
-
245
- Then confirm:
246
- ```
247
- ✓ viban updated to {LATEST_VERSION}
248
- ```
230
+ This silently checks for updates and only outputs if an update is applied.
package/docs/CLAUDE.md CHANGED
@@ -56,6 +56,34 @@ gh pr create --title "..." --body "..."
56
56
 
57
57
  ## Shell Script Rules
58
58
 
59
+ ### Language Policy (Critical)
60
+
61
+ **All user-facing text in the TUI must be in English**
62
+
63
+ This includes:
64
+ - Editor templates (title, description, priority, type prompts)
65
+ - Status messages
66
+ - Error messages
67
+ - Help text
68
+ - Comments in code
69
+
70
+ ```bash
71
+ # BAD: Korean in editor template
72
+ cat << EOF
73
+ 우선순위: P0/P1/P2/P3
74
+ EOF
75
+
76
+ # GOOD: English in editor template
77
+ cat << EOF
78
+ Priority: P0/P1/P2/P3
79
+ EOF
80
+ ```
81
+
82
+ **Rationale:**
83
+ - Consistent language throughout the interface
84
+ - Easier maintenance and testing
85
+ - Accessible to international users
86
+
59
87
  ### JSON Handling (Critical)
60
88
 
61
89
  **Use `printf '%s'` when piping shell variables to jq**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-plugin-viban",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "Terminal Kanban TUI for AI-human collaborative issue tracking",
5
5
  "main": "bin/viban",
6
6
  "bin": {