Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
133f761
Add runtime update check and adapter thinking fix
techjarves Nov 13, 2026
6e2fd1d
Document update check, model windows and runtime resume
techjarves Nov 13, 2026
4b86741
Document launcher commands
techjarves Nov 13, 2026
d1a6bf4
Merge PR #43 and #47: IME-safe composer and private LAN hosts
techjarves Nov 13, 2026
2efb954
Document private LAN HTTP security trade-off
techjarves Nov 13, 2026
d101ffb
Add permanent delete-conversation button to dashboard
techjarves Nov 13, 2026
247aeb1
Keep sidebar delete button visible for sync'd conversations
techjarves Nov 13, 2026
ae1d3b2
Add standalone resume, stored permission mode, and portable runtime i…
rainman74 Nov 14, 2026
476cd4a
Link the host Git configuration into portable sessions
rainman74 Nov 14, 2026
ac8e2f6
Document the full delta to the official repository
rainman74 Nov 14, 2026
b182531
Add paste and drop attachments, and send images as image blocks
rainman74 Nov 14, 2026
437ad84
Install Playwright from the launcher's install and update flow
rainman74 Nov 14, 2026
50bdd10
Mention Playwright in the lib/ tree description
rainman74 Nov 14, 2026
56a49a6
Bind Ctrl+V to image paste in the terminal, next to Alt+V
rainman74 Nov 14, 2026
16abdcf
Stop the sidebar rebuild from swallowing clicks
rainman74 Nov 14, 2026
deaaaa4
Release 2.0
rainman74 Nov 14, 2026
699def8
Tell sessions that the bundled Playwright exists
rainman74 Nov 14, 2026
bc13ad4
Make local paths clickable in the studio and document the terminal
rainman74 Nov 14, 2026
9f282f7
Release 2.1
rainman74 Nov 14, 2026
1d120de
Make paths in inline code clickable
rainman74 Nov 14, 2026
bf93b5e
Explain why Ctrl+V never reached Claude Code, and add WT.bat
rainman74 Nov 14, 2026
6ed0615
Remove the terminal changes
rainman74 Nov 14, 2026
d179b6d
Correct the image-paste fallback claim and drop the registry advice
rainman74 Nov 14, 2026
d9eb3f2
Correct the 2.0 section in place
rainman74 Nov 14, 2026
fffa7d4
Remove CHANGELOG.md
rainman74 Nov 14, 2026
c83eb6e
Load the demo video and thumbnail from the repository
rainman74 Nov 14, 2026
47be115
Fix the path handling and the local-model stack
rainman74 Nov 14, 2026
067c6e6
Fix the TLS upstream, the picker merge and the resume pause
rainman74 Nov 14, 2026
7d482cd
Accept a working directory that ends in a backslash
rainman74 Nov 14, 2026
7a58a99
Fix six review findings: permissions, picker cleanup, IPv6 and Ollama…
rainman74 Nov 14, 2026
3055e56
Reject empty file URLs and verify the upstream the proxy poll expects
rainman74 Nov 14, 2026
a53a5b8
Keep shared Ollama processes alive and verify the Chromium revision
rainman74 Nov 14, 2026
35c6fc3
Fix the five review findings, including two races in the new guards
rainman74 Nov 14, 2026
dfa5270
Bound the registry lock's age, never record a lost child, key the res…
rainman74 Nov 14, 2026
7857373
Decide proxy and server ownership by identity, not by child liveness
rainman74 Nov 14, 2026
904c972
Teach sessions to search through WebFetch, since WebSearch is server-…
rainman74 Nov 14, 2026
36af9ba
Version 2.3.0
rainman74 Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
node-version: '26'
- run: npm run check
- run: npm test
- name: Install official platform runtime
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@
# ── Node.js ───────────────────────────────────────────────────────
node_modules/
npm-debug.log*

# Private helper scripts - never commit
.___CLAUDE___.cmd
.___PUSH___.cmd

# Backup folders - ignored at every depth, never commit
.backup/
336 changes: 320 additions & 16 deletions README.md

Large diffs are not rendered by default.

52 changes: 50 additions & 2 deletions RESUME.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,50 @@
@echo off
call "%~dp0START.bat" resume %*
@echo off & setlocal EnableDelayedExpansion
Comment thread
rainman74 marked this conversation as resolved.
Resolved
chcp 65001 >nul
title ClaudeCode-Portable - Resume Session

REM Standalone session resume. Unlike START.bat this script installs, repairs,
REM updates and configures nothing - it only checks what START.bat set up once.

set "ROOT=%~dp0"

set "ARCH=x64"
if /i "%PROCESSOR_ARCHITECTURE%"=="ARM64" set "ARCH=arm64"
if /i "%PROCESSOR_ARCHITEW6432%"=="ARM64" set "ARCH=arm64"

set "NODE_EXE=%ROOT%engine\node-win32-%ARCH%\node.exe"
set "CLAUDE_EXE=%ROOT%engine\win32-%ARCH%\current\node_modules\@anthropic-ai\claude-code-win32-%ARCH%\claude.exe"

REM lib/paths.mjs lets PORTABLE_AI_DATA_DIR move the data folder, so the preflight
REM has to look where the runtime actually reads its settings from.
set "DATA_DIR=%PORTABLE_AI_DATA_DIR%"
if "%DATA_DIR%"=="" set "DATA_DIR=%ROOT%data"
set "CONFIG_FILE=%DATA_DIR%\settings.json"

if not exist "%NODE_EXE%" (
echo [ERROR] Portable Node.js was not found: %NODE_EXE%
echo [ERROR] Run START.bat once to install the portable runtime, then try again.
if not defined PORTABLE_AI_NO_PAUSE pause
exit /b 1
)

if not exist "%CLAUDE_EXE%" (
echo [ERROR] Claude Code was not found: %CLAUDE_EXE%
echo [ERROR] Run START.bat once to install the portable runtime, then try again.
if not defined PORTABLE_AI_NO_PAUSE pause
exit /b 1
)

if not exist "%CONFIG_FILE%" (
echo [ERROR] No provider is configured: %CONFIG_FILE%
echo [ERROR] Run START.bat once and choose a provider, then try again.
if not defined PORTABLE_AI_NO_PAUSE pause
exit /b 1
)

REM Argument parsing and validation happen in Node so quoting, duplicate flags
REM and the positional session ID / working directory rules stay testable.
"%NODE_EXE%" "%ROOT%tools\resume.mjs" %*
set "EXIT_CODE=%ERRORLEVEL%"

if not defined PORTABLE_AI_NO_PAUSE pause
exit /b %EXIT_CODE%
171 changes: 153 additions & 18 deletions dashboard/app.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dashboard/composer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function isComposerSubmitKey(event, compositionActive=false){
return event.key==='Enter'&&!event.shiftKey&&!event.isComposing&&!compositionActive;
}
4 changes: 2 additions & 2 deletions dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<header class="topbar">
<button class="icon-btn nav-toggle" id="nav-toggle" aria-label="Open navigation" aria-expanded="false"><span data-icon="menu"></span></button><button class="icon-btn sidebar-show" id="sidebar-show" aria-label="Show sidebar" title="Show sidebar" hidden><span data-icon="panel"></span></button>
<div class="breadcrumb"><span id="breadcrumb-icon" data-icon="folder"></span><button id="workspace-picker" title="Choose working directory">Workspace</button><span class="slash" id="breadcrumb-separator">/</span><span id="page-title">New session</span></div>
<div class="topbar-end"><button type="button" class="connection" id="connection" title="Configure provider and model"><span class="status-dot"></span>Connecting</button><span class="context-meter topbar-context" id="context-meter" title="Latest request context usage" hidden></span><button type="button" class="icon-btn theme-toggle" id="theme-toggle" aria-label="Switch to light theme" title="Switch to light theme" aria-pressed="false"><span data-icon="sun"></span></button></div>
<div class="topbar-end"><button type="button" class="connection" id="connection" title="Configure provider and model"><span class="status-dot"></span>Connecting</button><span class="context-meter topbar-context" id="context-meter" title="Latest request context usage" hidden></span><button type="button" class="icon-btn theme-toggle" id="theme-toggle" aria-label="Switch to light theme" title="Switch to light theme" aria-pressed="false"><span data-icon="sun"></span></button><button type="button" class="icon-btn delete-conversation" id="delete-conversation" aria-label="Delete conversation" title="Delete conversation" hidden><span data-icon="close"></span></button></div>
</header>

<section class="studio view" id="view-studio" aria-label="Coding workspace">
Expand All @@ -52,7 +52,7 @@ <h1>Your next idea.<br><span>Ready to build.</span></h1>
<label class="sr-only" for="prompt">Message your coding agent</label>
<textarea id="prompt" rows="2" placeholder="What would you like to build?" maxlength="100000"></textarea>
<div class="attachment-list" id="attachment-list" aria-live="polite" hidden></div>
<div class="composer-bottom"><div class="composer-context"><button type="button" class="attach-button" id="attach-button" aria-label="Attach files, screenshots, or ZIP archives" title="Attach files, screenshots, or ZIP archives"><span data-icon="plus"></span></button><input type="file" id="attachment-input" multiple hidden><div class="permission-control"><button type="button" id="permission-picker" class="permission-picker" aria-expanded="false" aria-controls="permission-menu"><span data-icon="shield"></span><span id="permission-label">Review actions</span><span data-icon="chevron"></span></button><div id="permission-menu" class="permission-menu" role="group" aria-label="Agent permission mode" hidden><div class="permission-menu-heading"><strong>Agent permissions</strong><small>Choose how the next turn can work.</small></div><button type="button" data-permission="default" aria-pressed="true"><span data-icon="shield"></span><span><strong>Review actions</strong><small>Claude Code asks before actions that need permission.</small></span><span class="permission-check" data-icon="check"></span></button><button type="button" data-permission="acceptEdits" aria-pressed="false"><span data-icon="code"></span><span><strong>Allow file edits</strong><small>Auto-allow file edits; other actions keep their permission checks.</small></span><span class="permission-check" data-icon="check"></span></button><button type="button" data-permission="bypassPermissions" aria-pressed="false"><span data-icon="alert"></span><span><strong>Unrestricted</strong><small>Skip tool approval checks. Only for workspaces you trust.</small></span><span class="permission-check" data-icon="check"></span></button><p>Changes apply to the next turn, not a running action.</p></div></div></div><div class="composer-actions"><label class="composer-model-control" title="Choose a saved provider and model"><span data-icon="server"></span><span class="sr-only">Provider and model</span><select id="composer-model" aria-label="Provider and model"></select></label><button type="button" id="stop" class="stop-btn" hidden><span data-icon="stop"></span>Stop</button><button type="submit" id="send" class="send-btn" aria-label="Send message"><span data-icon="arrow-up"></span></button></div></div>
<div class="composer-bottom"><div class="composer-context"><button type="button" class="attach-button" id="attach-button" aria-label="Attach files, screenshots, or ZIP archives. You can also paste or drop them." title="Attach files, screenshots, or ZIP archives — or paste and drop them"><span data-icon="plus"></span></button><input type="file" id="attachment-input" multiple hidden><div class="permission-control"><button type="button" id="permission-picker" class="permission-picker" aria-expanded="false" aria-controls="permission-menu"><span data-icon="shield"></span><span id="permission-label">Review actions</span><span data-icon="chevron"></span></button><div id="permission-menu" class="permission-menu" role="group" aria-label="Agent permission mode" hidden><div class="permission-menu-heading"><strong>Agent permissions</strong><small>Choose how the next turn can work.</small></div><button type="button" data-permission="default" aria-pressed="true"><span data-icon="shield"></span><span><strong>Review actions</strong><small>Claude Code asks before actions that need permission.</small></span><span class="permission-check" data-icon="check"></span></button><button type="button" data-permission="acceptEdits" aria-pressed="false"><span data-icon="code"></span><span><strong>Allow file edits</strong><small>Auto-allow file edits; other actions keep their permission checks.</small></span><span class="permission-check" data-icon="check"></span></button><button type="button" data-permission="bypassPermissions" aria-pressed="false"><span data-icon="alert"></span><span><strong>Unrestricted</strong><small>Skip tool approval checks. Only for workspaces you trust.</small></span><span class="permission-check" data-icon="check"></span></button><p>Changes apply to the next turn, not a running action.</p></div></div></div><div class="composer-actions"><label class="composer-model-control" title="Choose a saved provider and model"><span data-icon="server"></span><span class="sr-only">Provider and model</span><select id="composer-model" aria-label="Provider and model"></select></label><button type="button" id="stop" class="stop-btn" hidden><span data-icon="stop"></span>Stop</button><button type="submit" id="send" class="send-btn" aria-label="Send message"><span data-icon="arrow-up"></span></button></div></div>
</form>
<div class="composer-foot"><span><span data-icon="shield"></span>You stay in control. Approvals are on.</span><span>Shift + Enter for a new line</span></div>
</div>
Expand Down
145 changes: 145 additions & 0 deletions dashboard/links.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
// Turns local paths and URLs in rendered text into clickable elements.
//
// A path is only made clickable when it looks like an absolute local path or a
// file:// URL; relative fragments such as "src/app.ts" stay plain text so the
// reader is not sent chasing paths that mean nothing outside a project.

// A quoted path may contain spaces; an unquoted one may not, because spaces in
// running text are far more often the sentence than part of the folder name.
const QUOTED_PATH = /"[A-Za-z]:[\\/](?:[^\\/:*?"<>|\r\n]+[\\/])*[^\\/:*?"<>|\r\n]+"/g;
const WINDOWS_PATH = /[A-Za-z]:\\(?:[^\\\s/:*?"<>|\r\n]+\\)*[^\\\s/:*?"<>|\r\n]+/g;
Comment thread
rainman74 marked this conversation as resolved.
Resolved
// Windows accepts forward slashes too, and `C:/Users/x/file.txt` is a common way
// to write a path in text that came from a URL bar or a config file. The
// lookbehind keeps it from matching the tail of `https://`: there the colon is
// preceded by a letter, so that `s:/` is not a drive.
const WINDOWS_FORWARD_PATH = /(?<![A-Za-z0-9])[A-Za-z]:\/(?:[^\s/\\:*?"<>|]+\/)*[^\s/\\:*?"<>|]+/g;
const UNC_PATH = /\\\\[^\\\s/:*?"<>|\r\n]+\\[^\\\s/:*?"<>|\r\n]+(?:\\[^\\\s/:*?"<>|\r\n]+)*/g;
const FILE_URL = /file:\/\/\/[^\s<>"']+/gi;
// Trailing punctuation is usually the sentence, not the path.
const TRAILING = /[.,;:!?)\]}'"»”]+$/;

export function trimPath(value) {
let text = String(value || '');
let leading = '';
let trailing = '';
// Quotes belong to the sentence as well, and to the pattern that allows spaces.
while (text.length > 2 && /^["']/.test(text)) { leading += text[0]; text = text.slice(1); }
while (text.length > 1 && TRAILING.test(text)) {
trailing = text.slice(-1) + trailing;
text = text.slice(0, -1);
}
return { path: text, leading, trailing };
}

export function isFilePath(candidate) {
const value = String(candidate || '');
if (/^file:\/\//i.test(value)) return true;
if (/^[A-Za-z]:[\\/]/.test(value)) return true;
return /^\\\\[^\\/]+[\\/]/.test(value);
}

/**
* Replaces every path in a plain-text run with an anchor the caller styles.
* Returns the original text untouched when there is nothing to link.
*/
export function linkifyText(text, { allowed = isFilePath } = {}) {
const source = String(text ?? '');
if (!source) return source;
const matches = [];
// The quoted pattern runs first so a path with spaces is not cut short, and
// the file URL before the drive patterns so its inner `D:/` is not taken twice.
for (const pattern of [QUOTED_PATH, FILE_URL, WINDOWS_PATH, WINDOWS_FORWARD_PATH, UNC_PATH]) {
for (const match of source.matchAll(pattern)) matches.push({ index: match.index, text: match[0] });
}
if (!matches.length) return source;
matches.sort((a, b) => a.index - b.index);
const parts = [];
let cursor = 0;
let inserted = 0;
for (const match of matches) {
// Overlapping patterns can report the same run twice; the first one wins.
if (match.index < cursor) continue;
const { path, leading, trailing } = trimPath(match.text);
if (!path || !allowed(path)) continue;
parts.push(escapeHtml(source.slice(cursor, match.index)));
parts.push(escapeHtml(leading));
parts.push(pathButtonHtml(path));
parts.push(escapeHtml(trailing));
cursor = match.index + match.text.length;
inserted++;
}
if (!inserted) return source;
parts.push(escapeHtml(source.slice(cursor)));
return parts.join('');
}

// A button, not a link: opening a local file is an action with no URL, and a
// button stays reachable with Tab and the keyboard.
function pathButtonHtml(path) {
return `<button type="button" class="path-link" data-open-path="${escapeHtml(path)}" title="Open ${escapeHtml(path)}">${escapeHtml(path)}</button>`;
}

export function escapeHtml(value) {
return String(value ?? '').replace(/[&<>"']/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
}

/**
* Acts on already-rendered HTML: every web link gets target and rel so it never
* navigates the studio away, and every text node outside code blocks and links
* is scanned for paths. Returns how many nodes were rewritten.
*
* Inline code is linkified as a whole: backticks mark the exact value, so a
* space inside them belongs to the path (`D:\Apps\Claude Code\x.jpg`) rather
* than to the sentence. Code blocks stay plain so copying them still works.
*/
export function linkifyElement(root, documentRef = globalThis.document, { skip = 'PRE, A, BUTTON, TEXTAREA, SCRIPT, STYLE' } = {}) {
if (!root) return 0;
for (const link of root.querySelectorAll('a[href]')) {
if (!/^https?:/i.test(link.getAttribute('href'))) continue;
link.target = '_blank';
link.rel = 'noopener noreferrer';
}
const walker = documentRef.createTreeWalker(root, NodeFilter.SHOW_TEXT);
const targets = [];
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
if (!node.nodeValue || !node.nodeValue.trim()) continue;
const parent = node.parentElement;
// Code blocks keep their text selectable and copyable, and links stay links.
if (!parent || parent.closest(skip)) continue;
targets.push({ node, inlineCode: parent.tagName === 'CODE' });
}
let changed = 0;
for (const { node, inlineCode } of targets) {
const replacement = inlineCode ? inlineCodeHtml(node.nodeValue) : linkifyText(node.nodeValue);
if (replacement === node.nodeValue) continue;
const template = documentRef.createElement('template');
template.innerHTML = replacement;
node.parentNode.replaceChild(template.content, node);
changed++;
}
return changed;
}

// A whole inline-code span that is one path becomes one button.
function inlineCodeHtml(text) {
const value = String(text ?? '');
const path = inlineCodePath(value);
// Inside backticks the value is either one path or nothing; a partial
// replacement would cut a path with spaces in half.
return path ? pathButtonHtml(path) : value;
Comment thread
rainman74 marked this conversation as resolved.
Resolved
}

/**
* The path an inline-code span holds, or null. Accepts the whole span only when
* it holds exactly one path: two drive letters mean two paths, and a path with
* spaces would otherwise be split at the wrong place.
*/
export function inlineCodePath(text) {
const value = String(text ?? '').trim();
if (!value || /\n/.test(value)) return null;
// A file URL carries a drive letter of its own, so it is counted separately.
const markers = /^file:\/\//i.test(value) ? [(value.match(/^file:\/\//i) || [''])[0]] : value.match(/[A-Za-z]:[\\/]/g);
if (!markers || markers.length !== 1) return null;
const { path } = trimPath(value);
return path && isFilePath(path) ? path : null;
}
25 changes: 25 additions & 0 deletions dashboard/permission-turn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* The composer's permission picker chooses the mode for the next turn, not for
* the rest of the session: the dialog says "Enable for next turn", the toast
* says "selected for the next turn", and the README describes it as a
* single-turn override. Without this the confirmed Unrestricted choice would be
* attached to every later run - in every workspace - and bypass approvals
* silently.
*
* `runMode` is the mode the finished turn ran with, `currentMode` is what the
* picker holds now, `defaultMode` is the stored preference the studio starts
* from, and `pickedDuringRun` says whether the user opened the picker while the
* turn was running. Such a deliberate choice belongs to the next turn and is
* kept - even when it names the same mode the running turn already used, which
* a value comparison alone cannot tell apart from "nothing was picked".
*
* @returns {{mode: string, reset: boolean}} the mode to keep and whether the UI
* has to update because it changed.
*/
export function permissionModeAfterRun({ runMode, currentMode, defaultMode, pickedDuringRun = false }) {
if (pickedDuringRun) return { mode: currentMode, reset: false };
// Picked while the turn was running before this flag existed.
if (currentMode !== runMode) return { mode: currentMode, reset: false };
if (runMode === defaultMode) return { mode: currentMode, reset: false };
return { mode: defaultMode, reset: currentMode !== defaultMode };
}
Loading