ccmanager 3.5.4 → 3.6.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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from 'react';
3
- import { Box, Text, useInput } from 'ink';
3
+ import { Box, Text, useInput, useStdout } from 'ink';
4
4
  import SelectInput from 'ink-select-input';
5
5
  import { Effect } from 'effect';
6
6
  import { SessionManager } from '../services/sessionManager.js';
@@ -35,13 +35,29 @@ const Menu = ({ sessionManager, worktreeService, onSelectWorktree, onSelectRecen
35
35
  const [sessions, setSessions] = useState([]);
36
36
  const [items, setItems] = useState([]);
37
37
  const [recentProjects, setRecentProjects] = useState([]);
38
- const limit = 10;
39
- // Get worktree configuration for sorting
40
- const worktreeConfig = configReader.getWorktreeConfig();
38
+ const { stdout } = useStdout();
39
+ const fixedRows = 6;
40
+ const [terminalRows, setTerminalRows] = useState(stdout.rows);
41
+ // Update terminal rows on resize
42
+ useEffect(() => {
43
+ const handleResize = () => {
44
+ setTerminalRows(stdout.rows);
45
+ };
46
+ stdout.on('resize', handleResize);
47
+ return () => {
48
+ stdout.off('resize', handleResize);
49
+ };
50
+ }, [stdout]);
41
51
  // Use the search mode hook
42
52
  const { isSearchMode, searchQuery, selectedIndex, setSearchQuery } = useSearchMode(items.length, {
43
53
  isDisabled: !!error || !!loadError,
44
54
  });
55
+ const limit = Math.max(5, terminalRows -
56
+ fixedRows -
57
+ (isSearchMode ? 1 : 0) -
58
+ (error || loadError ? 3 : 0));
59
+ // Get worktree configuration for sorting
60
+ const worktreeConfig = configReader.getWorktreeConfig();
45
61
  useEffect(() => {
46
62
  let cancelled = false;
47
63
  // Load worktrees and default branch using Effect composition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccmanager",
3
- "version": "3.5.4",
3
+ "version": "3.6.0",
4
4
  "description": "TUI application for managing multiple Claude Code sessions across Git worktrees",
5
5
  "license": "MIT",
6
6
  "author": "Kodai Kabasawa",
@@ -41,11 +41,11 @@
41
41
  "bin"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@kodaikabasawa/ccmanager-darwin-arm64": "3.5.4",
45
- "@kodaikabasawa/ccmanager-darwin-x64": "3.5.4",
46
- "@kodaikabasawa/ccmanager-linux-arm64": "3.5.4",
47
- "@kodaikabasawa/ccmanager-linux-x64": "3.5.4",
48
- "@kodaikabasawa/ccmanager-win32-x64": "3.5.4"
44
+ "@kodaikabasawa/ccmanager-darwin-arm64": "3.6.0",
45
+ "@kodaikabasawa/ccmanager-darwin-x64": "3.6.0",
46
+ "@kodaikabasawa/ccmanager-linux-arm64": "3.6.0",
47
+ "@kodaikabasawa/ccmanager-linux-x64": "3.6.0",
48
+ "@kodaikabasawa/ccmanager-win32-x64": "3.6.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@eslint/js": "^9.28.0",