- Validate authToken with trim() to reject whitespace-only values
- Show broken model warning for both remote and local modes
- Add context-aware messaging for remote proxy users
- Add comprehensive test coverage for authToken edge cases:
- Whitespace-only strings
- Null values
- Tabs/newlines
- Tokens with leading/trailing whitespace
Co-authored-by: Shun Kakinoki <shunkakinoki@gmail.com>
When --proxy-host and --proxy-auth-token are provided, the remote proxy
handles authentication via its own OAuth sessions. This change skips:
- Local OAuth check/trigger
- Preflight quota check (managed by remote server)
- Model configuration prompts (configured on remote server)
- Broken model warnings (model selection is remote)
This enables headless CI/CD usage without requiring pre-cached
CCS_SESSIONS when a remote proxy with auth token is available.
- postuninstall.js: add file logging for debugging on error
- profile-hook-injector.ts: use 'wx' flag for atomic marker creation
- profile-hook-injector.ts: include parse error message in debug log
- install-command.ts: use actual counts for consistent semantics
- Windows tests: align Section 7 with per-profile hook architecture
- ClaudeSymlinkManager.uninstall() now returns count for accurate reporting
- install-command.ts uses return value instead of always incrementing
- claude-dir-installer.ts uses getCcsHome() directly instead of string manipulation
- Add TODO comments to tests explaining --install is a no-op
Fix test isolation in symlink managers and checkers to prevent tests
from touching user's real ~/.ccs/ and ~/.claude/ directories.
Files fixed:
- src/api/services/profile-writer.ts - use getCcsDir()
- src/management/checks/symlink-check.ts - use functions instead of
module-level constants
- src/utils/claude-dir-installer.ts - use getCcsDir() for CCS paths
- src/utils/claude-symlink-manager.ts - use getCcsHome()/getCcsDir()
Replace os.homedir() with getCcsDir() in 11 source files to ensure
tests don't touch the user's real ~/.ccs/ directory. The getCcsDir()
function from config-manager.ts respects CCS_HOME env var for
test isolation.
Files fixed:
- src/auth/profile-detector.ts
- src/auth/profile-registry.ts
- src/delegation/headless-executor.ts
- src/delegation/session-manager.ts
- src/glmt/glmt-transformer.ts
- src/management/checks/config-check.ts
- src/management/checks/profile-check.ts
- src/management/checks/system-check.ts
- src/management/instance-manager.ts
- src/management/shared-manager.ts
- src/utils/update-checker.ts
Critical fix: setup_completed was set in memory but never written to disk.
- Add setup_completed to generateYamlWithComments() for YAML serialization
- Add setup_completed to mergeWithDefaults() to preserve during config merge
Without these changes, the flag was lost on save/reload, causing first-time
notice to reappear.
Addresses critical code review feedback on PR #372.
Add hook injection at profile creation time (not just runtime):
- profile-writer.ts: inject on API profile create/update
- variant-settings.ts: inject on CLIProxy variant create
Hooks now present immediately after profile creation.
- Add 3 test cases for setup_completed flag:
- Detect flag when present and true
- Treat missing flag as first-time eligible
- Treat false flag as first-time eligible
- Update JSDoc to document detection priority order
Addresses code review feedback on PR #372.
After running ccs setup with local proxy mode, the CLI was still showing
the first-time install notice because isFirstTimeInstall() only checked
for user-created content (profiles, accounts, variants, etc.). When user
chose "Local" mode and skipped API profiles, config had empty objects,
causing all checks to return false.
Added setup_completed flag to UnifiedConfig interface and set it to true
when setup wizard completes. isFirstTimeInstall() now checks this flag
first.
Ensure all hook-related modules use getCcsDir() from environment.ts
for consistent test isolation. Prevents tests from touching the user's
real ~/.ccs/ directory during test runs.
Changes:
- hook-config.ts: Use getCcsDir() for hookConfigPath
- hook-installer.ts: Use getCcsDir() for HOOK_SOURCE_PATH
- profile-hook-injector.ts: Use getCcsDir() for hook sources
- CLAUDE.md: Add test isolation rules
- remove removeHookConfig() call from uninstallWebSearchHook()
- add removeMigrationMarker() cleanup
- update postuninstall.js to only clean CCS files
- global ~/.claude/settings.json is never touched
- ensureProfileHooks() injects hooks into profile settings
- migrateGlobalHook() one-time migration from global settings
- removeMigrationMarker() cleanup for uninstall
- export from barrel files for module access
- save selected provider to localStorage on both pages
- restore selection on page load
- validate saved provider still exists before restoring
- improves UX by eliminating need to re-select provider after reload
- treat models with resetTime but null/missing remainingFraction as 0%
- matches CLIProxy Management Center behavior
- enables accurate Claude reset time display when quota exhausted
- mark primary models at 0% as exhausted for red styling
- Remove early return for paused accounts in quota fetcher
- Check both auth/ and auth-paused/ directories when reading auth data
- Allows users to see quota status of paused accounts to know when to unpause
- Remove "Exhausted" text in tooltip, just show 0% in red (saves width)
- Remove tier group headers, use delimiter lines between tiers
- Show full model names (Claude Opus 4.5 (Thinking), etc.)
- Show "Exhausted" in percentage column instead of appending to name
- Add all known primary models when exhausted
- Replace generic "Claude/GPT (Exhausted)" with actual model names
- Group models by tier with visual headers:
- Claude & GPT (primary, weekly limits)
- Gemini 3 (high capability)
- Gemini 2.5 (mid tier)
- Other
- When primary models exhausted, show known models with "(Exhausted)" label
- Add border separators between tier groups for visual clarity
When Claude/GPT models are exhausted (0%), API removes them from response.
Added getModelsWithExhaustedIndicator() to prepend synthetic "Claude/GPT
(Exhausted)" entry with 0% when primary models missing. Styled in red for
visibility. Applied to both account-item and flow-viz account-card tooltips.
- include GPT models in primary quota filter (not just Claude)
- return 0% when Claude/GPT missing from API (exhausted, not 100%)
- fallback to all models for reset time when primary exhausted
- add getClaudeResetTime to match getMinClaudeQuota logic
- weekly Claude resets now show absolute date (01/27, 12:07)
- daily Gemini resets no longer overshadow Claude weekly limits
- move BulkActionBar above account list (was at bottom)
- only show bar when selections exist (cleaner default)
- add selection checkbox to each AccountItem
- highlight selected accounts with ring + background
- Add visible pause/resume toggle button to AccountCard in flow-viz
(appears on hover or when paused, with tooltip)
- Pass pause toggle props from AuthMonitor through AccountFlowViz
- Remove redundant pause/resume from account-item dropdown menu
(keeps only "Set as default" and "Remove account")
- Add paused state to AccountData type with opacity indication
Reverts the expandable ProviderCard design back to click-to-navigate.
The pause toggle feature is preserved in AccountItem cards in Provider
Editor, not in the Live Account Monitor overview.
- Remove expandable account list component
- Remove unused pause/resume/solo mutations from AuthMonitor
- Restore original ProviderCard props interface
- Keep acc.paused opacity-50 for visual indication on dots
- add pause/play button left of user avatar
- paused accounts show play icon (green) and dimmed card
- active accounts show pause icon
- includes loading spinner and tooltip