@pixelbyte-software/pixcode 1.46.7 → 1.47.1

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.
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+
4
+ const issues = [
5
+ {
6
+ title: 'feat(vscode-layout): audit existing open issues before workbench rollout',
7
+ body: `Reason
8
+ The VS Code-style workbench should be delivered together with the current GitHub issue queue, not as an isolated local note.
9
+
10
+ Scope
11
+ - Read all currently open issues in alicomert/pixcode.
12
+ - Mark which issues are directly affected by the VS Code workbench shell.
13
+ - Keep unrelated issues open and untouched.
14
+ - Add completion notes to related issues after implementation.
15
+
16
+ Acceptance
17
+ - Existing issues are reviewed before release.
18
+ - Related issues receive implementation notes.
19
+ - No unrelated issue is closed only because this work shipped.`,
20
+ },
21
+ {
22
+ title: 'feat(vscode-layout): add selectable VS Code-style workbench mode',
23
+ body: `Reason
24
+ Users are more familiar with the VS Code workspace model, so Pixcode should offer a separate VS Code-style view without removing the existing experience.
25
+
26
+ Scope
27
+ - Add a persisted classic/vscode layout preference.
28
+ - Keep the current Pixcode UI available.
29
+ - Switch desktop users into the VS Code-style workbench when selected.
30
+ - Leave mobile on the existing responsive shell.
31
+
32
+ Acceptance
33
+ - Users can choose between the existing Pixcode view and VS Code-style view.
34
+ - The chosen mode persists between sessions.
35
+ - Desktop users can enter the new workbench without changing provider/session behavior.`,
36
+ },
37
+ {
38
+ title: 'feat(vscode-layout): build left activity bar and explorer panels',
39
+ body: `Reason
40
+ The left side should match the familiar VS Code model: activity buttons plus project/files/source-control/terminal panels.
41
+
42
+ Scope
43
+ - Add Explorer, Projects, Source Control, and Terminal activity buttons.
44
+ - Reuse the existing Pixcode project/sidebar component for project and history access.
45
+ - Reuse the existing file tree, git panel, and standalone shell.
46
+ - Allow the left pane to collapse and resize.
47
+
48
+ Acceptance
49
+ - Project and session selection still works from the new shell.
50
+ - File tree actions still open files.
51
+ - Left pane can be resized and collapsed.`,
52
+ },
53
+ {
54
+ title: 'feat(vscode-layout): add central editor surface for files and system screens',
55
+ body: `Reason
56
+ VS Code users expect file contents and code to live in the middle, while platform screens remain reachable without leaving the workbench.
57
+
58
+ Scope
59
+ - Open file tree selections in the central editor.
60
+ - Reuse the existing CodeMirror editor and save/download behavior.
61
+ - Render Control Room, Remote, Orchestration, Tasks, and plugin screens in the center when selected.
62
+ - Keep the center area responsive between resizable side panes.
63
+
64
+ Acceptance
65
+ - Opening a file from Explorer shows it in the center.
66
+ - System screens remain available inside the workbench.
67
+ - The center pane remains usable while resizing side panes.`,
68
+ },
69
+ {
70
+ title: 'feat(vscode-layout): add right-side CLI work area for all providers',
71
+ body: `Reason
72
+ The selected CLI should run in the right pane, similar to a focused agent/terminal side area in a three-column workbench.
73
+
74
+ Scope
75
+ - Reuse the current chat/CLI orchestration surface in the right pane.
76
+ - Preserve Claude Code, Cursor, Codex, Gemini, Qwen Code, and OpenCode selection through existing provider controls.
77
+ - Add a terminal tab in the right pane for shell work.
78
+ - Allow the right pane to resize.
79
+
80
+ Acceptance
81
+ - Existing provider selection and send flow are reused.
82
+ - The right pane can run CLI chat work and terminal work.
83
+ - The pane can be resized without layout overlap.`,
84
+ },
85
+ {
86
+ title: 'feat(vscode-layout): expose layout at login and settings before release',
87
+ body: `Reason
88
+ Users should be able to choose the new layout on entry and change it later without hunting through hidden configuration.
89
+
90
+ Scope
91
+ - Add layout selection to login.
92
+ - Add layout selection to Appearance settings.
93
+ - Add translations for supported locales.
94
+ - Verify with smoke, typecheck, lint, and build.
95
+ - Publish a release only after all issue notes are posted.
96
+
97
+ Acceptance
98
+ - Login includes Classic and VS Code workbench choices.
99
+ - Appearance settings includes the same choices.
100
+ - Locale coverage exists for all supported language files.
101
+ - Release work starts only after verification is clean.`,
102
+ },
103
+ ];
104
+
105
+ for (const issue of issues) {
106
+ const result = spawnSync(
107
+ 'gh',
108
+ ['issue', 'create', '--repo', 'alicomert/pixcode', '--title', issue.title, '--body', issue.body],
109
+ {
110
+ stdio: 'inherit',
111
+ env: {
112
+ ...process.env,
113
+ GH_TOKEN: process.env.GITHUB_TOKEN || process.env.GH_TOKEN || '',
114
+ },
115
+ },
116
+ );
117
+
118
+ if (result.status !== 0) {
119
+ process.exit(result.status ?? 1);
120
+ }
121
+ }
@@ -0,0 +1,100 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+
3
+ function assert(condition, message) {
4
+ if (!condition) {
5
+ throw new Error(message);
6
+ }
7
+ }
8
+
9
+ function read(path) {
10
+ assert(existsSync(path), `${path} should exist`);
11
+ return readFileSync(path, 'utf8');
12
+ }
13
+
14
+ const preferenceHook = read('src/hooks/useWorkbenchLayoutPreference.ts');
15
+ const appContent = read('src/components/app/AppContent.tsx');
16
+ const workbench = read('src/components/vscode-workbench/view/VSCodeWorkbench.tsx');
17
+ const appearanceTab = read('src/components/settings/view/tabs/AppearanceSettingsTab.tsx');
18
+ const loginForm = read('src/components/auth/view/LoginForm.tsx');
19
+ const issuePlan = read('docs/issues/vscode-workbench-layout.md');
20
+
21
+ const enCommon = JSON.parse(read('src/i18n/locales/en/common.json'));
22
+ const enSettings = JSON.parse(read('src/i18n/locales/en/settings.json'));
23
+ const enAuth = JSON.parse(read('src/i18n/locales/en/auth.json'));
24
+
25
+ assert(
26
+ preferenceHook.includes('WORKBENCH_LAYOUT_STORAGE_KEY')
27
+ && preferenceHook.includes("'classic'")
28
+ && preferenceHook.includes("'vscode'")
29
+ && preferenceHook.includes('pixcode:workbench-layout-change'),
30
+ 'Workbench layout preference hook should persist classic/vscode and broadcast updates.',
31
+ );
32
+
33
+ assert(
34
+ appContent.includes('useWorkbenchLayoutPreference')
35
+ && appContent.includes('VSCodeWorkbench')
36
+ && appContent.includes('useVscodeWorkbench')
37
+ && appContent.includes('!useVscodeWorkbench && !isMobile')
38
+ && appContent.includes('<VSCodeWorkbench'),
39
+ 'AppContent should switch desktop users from the classic shell into VSCodeWorkbench.',
40
+ );
41
+
42
+ assert(
43
+ workbench.includes('FileTree')
44
+ && workbench.includes('CodeEditor')
45
+ && workbench.includes('ChatInterface')
46
+ && workbench.includes('StandaloneShell')
47
+ && workbench.includes('GitPanel')
48
+ && workbench.includes('role="separator"')
49
+ && workbench.includes('aria-orientation="vertical"')
50
+ && workbench.includes('leftPaneWidth')
51
+ && workbench.includes('rightPaneWidth')
52
+ && workbench.includes('ActivityButton'),
53
+ 'VSCodeWorkbench should compose existing files/editor/git/shell/chat surfaces with vertical resizers.',
54
+ );
55
+
56
+ assert(
57
+ appearanceTab.includes('workbenchLayout')
58
+ && appearanceTab.includes('onWorkbenchLayoutChange')
59
+ && appearanceTab.includes('role="radio"')
60
+ && appearanceTab.includes('appearanceSettings.workbenchLayout'),
61
+ 'Appearance settings should expose the workbench layout selector.',
62
+ );
63
+
64
+ assert(
65
+ loginForm.includes('useWorkbenchLayoutPreference')
66
+ && loginForm.includes('login.layout')
67
+ && loginForm.includes('setWorkbenchLayout'),
68
+ 'Login should let users choose the workspace layout before signing in.',
69
+ );
70
+
71
+ assert(
72
+ enCommon.vscodeWorkbench?.title
73
+ && enCommon.vscodeWorkbench?.activity?.explorer
74
+ && enCommon.vscodeWorkbench?.panels?.cli,
75
+ 'English common locale should include VSCode workbench copy.',
76
+ );
77
+
78
+ assert(
79
+ enSettings.appearanceSettings?.workbenchLayout?.title
80
+ && enSettings.appearanceSettings?.workbenchLayout?.options?.vscode?.label,
81
+ 'English settings locale should include workbench layout settings copy.',
82
+ );
83
+
84
+ assert(
85
+ enAuth.login?.layout?.title
86
+ && enAuth.login?.layout?.options?.vscode,
87
+ 'English auth locale should include login layout selector copy.',
88
+ );
89
+
90
+ assert(
91
+ issuePlan.includes('Issue 1')
92
+ && issuePlan.includes('Issue 2')
93
+ && issuePlan.includes('Issue 3')
94
+ && issuePlan.includes('Issue 4')
95
+ && issuePlan.includes('Issue 5')
96
+ && issuePlan.includes('Status: Completed'),
97
+ 'Local issue plan should track the sliced work and completion notes while GitHub is unavailable.',
98
+ );
99
+
100
+ console.log('vscode workbench layout smoke passed');
@@ -0,0 +1,101 @@
1
+ import assert from 'node:assert/strict';
2
+ import fs from 'node:fs';
3
+
4
+ const read = (path) => fs.readFileSync(path, 'utf8');
5
+
6
+ const workbench = read('src/components/vscode-workbench/view/VSCodeWorkbench.tsx');
7
+ const projectType = read('src/types/app.ts');
8
+ const projectsServer = read('server/projects.js');
9
+ const mainState = read('src/components/main-content/view/subcomponents/MainContentStateView.tsx');
10
+ const chatInterface = read('src/components/chat/view/ChatInterface.tsx');
11
+ const chatComposer = read('src/components/chat/view/subcomponents/ChatComposer.tsx');
12
+ const workerSlots = read('src/components/chat/view/subcomponents/WorkerSlotsControl.tsx');
13
+ const wizard = read('src/components/project-creation-wizard/ProjectCreationWizard.tsx');
14
+ const sidebar = read('src/components/sidebar/view/Sidebar.tsx');
15
+
16
+ assert.match(
17
+ workbench,
18
+ /function WorkbenchMenuBar/,
19
+ 'VS Code workbench should render a top menu bar.',
20
+ );
21
+
22
+ for (const item of ['File', 'Edit', 'Selection', 'View', 'Go', 'Run', 'Terminal', 'Help']) {
23
+ assert.match(workbench, new RegExp(`label: '${item}'`), `Workbench menu should include ${item}.`);
24
+ }
25
+
26
+ assert.match(
27
+ workbench,
28
+ /type:\s*'existing'/,
29
+ 'File > Open Project should dispatch the existing-folder project wizard flow.',
30
+ );
31
+
32
+ assert.match(
33
+ workbench,
34
+ /type:\s*'new'/,
35
+ 'File > Clone From GitHub should dispatch the GitHub clone project wizard flow.',
36
+ );
37
+
38
+ assert.match(
39
+ workbench,
40
+ /function WorkbenchProjectsPanel/,
41
+ 'Projects activity should use a dedicated project-directory panel.',
42
+ );
43
+
44
+ assert.doesNotMatch(
45
+ workbench,
46
+ /return <Sidebar \{\.\.\.sidebarProps\} isMobile=\{false\} \/>/,
47
+ 'Projects activity should not render the chat-history sidebar.',
48
+ );
49
+
50
+ assert.match(
51
+ workbench,
52
+ /formatProjectPath/,
53
+ 'Projects panel should render a shortened path instead of dumping the full directory.',
54
+ );
55
+
56
+ assert.match(
57
+ workbench,
58
+ /formatFileCount/,
59
+ 'Projects panel should show file counts.',
60
+ );
61
+
62
+ assert.match(projectType, /fileCount\?: number/, 'Project type should expose optional fileCount metadata.');
63
+ assert.match(projectsServer, /async function countProjectFiles/, 'Backend should count project files for the workbench project list.');
64
+
65
+ assert.match(
66
+ mainState,
67
+ /repeat\(auto-fit,\s*minmax\(min\(100%,\s*11rem\),\s*1fr\)\)/,
68
+ 'Start workspace cards should auto-fit instead of forcing cramped fixed columns.',
69
+ );
70
+
71
+ assert.doesNotMatch(
72
+ workbench,
73
+ /<main className="min-w-\[360px\]/,
74
+ 'Workbench center panel should be allowed to shrink with narrow three-pane layouts.',
75
+ );
76
+
77
+ assert.match(
78
+ workbench,
79
+ /compactComposer/,
80
+ 'Workbench should request compact composer behavior in the right CLI pane.',
81
+ );
82
+
83
+ assert.match(chatInterface, /compactComposer\?: boolean/, 'ChatInterface should expose compactComposer for narrow workbench panes.');
84
+ assert.match(chatComposer, /compact\?: boolean/, 'ChatComposer should expose a compact prop.');
85
+ assert.match(chatComposer, /flex-wrap/, 'ChatComposer footer should wrap controls in narrow panes.');
86
+ assert.match(workerSlots, /panelClassName\?: string/, 'WorkerSlotsControl should allow a compact panel width override.');
87
+ assert.match(chatComposer, /panelClassName=\{compact/, 'Compact composer should constrain the worker-slot panel.');
88
+
89
+ assert.match(
90
+ wizard,
91
+ /initialWorkspaceType\?: WorkspaceType/,
92
+ 'Project wizard should accept an initial workspace type from the workbench File menu.',
93
+ );
94
+
95
+ assert.match(
96
+ sidebar,
97
+ /event as CustomEvent<\{ workspaceType\?: WorkspaceType \}>/,
98
+ 'Sidebar create-project event should forward the requested workspace type into the wizard.',
99
+ );
100
+
101
+ console.log('vscode workbench polish smoke passed');
@@ -68,6 +68,74 @@ import Database from 'better-sqlite3';
68
68
  import sessionManager from './sessionManager.js';
69
69
  import { applyCustomSessionNames } from './database/db.js';
70
70
 
71
+ const FILE_COUNT_LIMIT = 20000;
72
+ const FILE_COUNT_IGNORED_DIRECTORIES = new Set([
73
+ '.cache',
74
+ '.git',
75
+ '.hg',
76
+ '.next',
77
+ '.npm',
78
+ '.pnpm-store',
79
+ '.svn',
80
+ '.turbo',
81
+ '.vite',
82
+ 'build',
83
+ 'coverage',
84
+ 'dist',
85
+ 'dist-server',
86
+ 'node_modules',
87
+ 'out',
88
+ 'target',
89
+ 'vendor'
90
+ ]);
91
+
92
+ async function countProjectFiles(projectPath, maxFiles = FILE_COUNT_LIMIT) {
93
+ if (!projectPath || typeof projectPath !== 'string') {
94
+ return undefined;
95
+ }
96
+
97
+ try {
98
+ const stats = await fs.stat(projectPath);
99
+ if (!stats.isDirectory()) {
100
+ return undefined;
101
+ }
102
+ } catch {
103
+ return undefined;
104
+ }
105
+
106
+ let count = 0;
107
+ const pendingDirectories = [projectPath];
108
+
109
+ while (pendingDirectories.length > 0) {
110
+ const currentDirectory = pendingDirectories.pop();
111
+ let entries = [];
112
+
113
+ try {
114
+ entries = await fs.readdir(currentDirectory, { withFileTypes: true });
115
+ } catch {
116
+ continue;
117
+ }
118
+
119
+ for (const entry of entries) {
120
+ if (entry.isDirectory()) {
121
+ if (!FILE_COUNT_IGNORED_DIRECTORIES.has(entry.name)) {
122
+ pendingDirectories.push(path.join(currentDirectory, entry.name));
123
+ }
124
+ continue;
125
+ }
126
+
127
+ if (entry.isFile() || entry.isSymbolicLink()) {
128
+ count += 1;
129
+ if (count >= maxFiles) {
130
+ return count;
131
+ }
132
+ }
133
+ }
134
+ }
135
+
136
+ return count;
137
+ }
138
+
71
139
  // Import TaskMaster detection functions
72
140
  async function detectTaskMasterFolder(projectPath) {
73
141
  try {
@@ -691,6 +759,7 @@ async function getProjects(progressCallback = null) {
691
759
  path: actualProjectDir,
692
760
  displayName: customName || autoDisplayName,
693
761
  fullPath: actualProjectDir,
762
+ fileCount: await countProjectFiles(actualProjectDir),
694
763
  isCustomName: !!customName,
695
764
  isManuallyAdded,
696
765
  autoDiscovered: isAutoDiscovered,
@@ -832,6 +901,7 @@ async function getProjects(progressCallback = null) {
832
901
  path: actualProjectDir,
833
902
  displayName: projectConfig.displayName || await generateDisplayName(projectName, actualProjectDir),
834
903
  fullPath: actualProjectDir,
904
+ fileCount: await countProjectFiles(actualProjectDir),
835
905
  isCustomName: !!projectConfig.displayName,
836
906
  isManuallyAdded,
837
907
  autoDiscovered: isAutoDiscovered,
@@ -1557,6 +1627,7 @@ async function addProjectManually(projectPath, displayName = null) {
1557
1627
  path: absolutePath,
1558
1628
  fullPath: absolutePath,
1559
1629
  displayName: displayName || await generateDisplayName(projectName, absolutePath),
1630
+ fileCount: await countProjectFiles(absolutePath),
1560
1631
  isManuallyAdded: true,
1561
1632
  sessions: [],
1562
1633
  cursorSessions: []
@@ -1584,6 +1655,7 @@ async function addProjectManually(projectPath, displayName = null) {
1584
1655
  path: absolutePath,
1585
1656
  fullPath: absolutePath,
1586
1657
  displayName: displayName || await generateDisplayName(projectName, absolutePath),
1658
+ fileCount: await countProjectFiles(absolutePath),
1587
1659
  isManuallyAdded: true,
1588
1660
  sessions: [],
1589
1661
  cursorSessions: []