mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19:42 +02:00
Merge #428: one toolbar instance stepper, not two
Only the stepper half of #428 lands here. Its other half, the phone case picker search, shipped separately in #488 (1.33.1) and is kept as it is on master, so every file of this merge starts from ours and only the stepper changes are ported onto it: - index.html: the second `− 1 +` group (#shellCount) after Run Shell is gone. - session-ui.js: incrementShellCount/decrementShellCount are removed and runShell() reads the toolbar's one stepper through _readTabCount(), the helper master grew since #428 was opened (same clamp and absent-element fallback as #428's _toolbarInstanceCount()). - run-mode-ui tests stub #tabCount instead of #shellCount, plus #428's "toolbar instance count" block adapted to _readTabCount() and a markup check. - wiki: "the instance counter", singular. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -700,11 +700,9 @@
|
||||
<button class="btn-toolbar btn-enter" onclick="app.sendEnterKey()" title="Send Enter">
|
||||
Enter
|
||||
</button>
|
||||
<div class="tab-count-group" title="Instance count">
|
||||
<button class="tab-count-btn" onclick="app.decrementShellCount()">−</button>
|
||||
<input type="number" id="shellCount" class="tab-count-input" value="1" min="1" max="20" readonly>
|
||||
<button class="tab-count-btn" onclick="app.incrementShellCount()">+</button>
|
||||
</div>
|
||||
<!-- Run Shell had a second, identical instance-count stepper here. The
|
||||
toolbar carried two of them side by side, so it is gone and Run
|
||||
Shell reads the one above (#tabCount) like the Run button does. -->
|
||||
<div class="case-select-group">
|
||||
<div class="case-combobox" id="quickStartCasePicker">
|
||||
<input
|
||||
|
||||
@@ -1803,19 +1803,6 @@ Object.assign(CodemanApp.prototype, {
|
||||
input.value = Math.max(1, current - 1);
|
||||
},
|
||||
|
||||
// Shell count stepper functions
|
||||
incrementShellCount() {
|
||||
const input = document.getElementById('shellCount');
|
||||
const current = parseInt(input.value) || 1;
|
||||
input.value = Math.min(20, current + 1);
|
||||
},
|
||||
|
||||
decrementShellCount() {
|
||||
const input = document.getElementById('shellCount');
|
||||
const current = parseInt(input.value) || 1;
|
||||
input.value = Math.max(1, current - 1);
|
||||
},
|
||||
|
||||
// Next free <prefix><n> index for a case's session tabs (e.g. w1-<case>,
|
||||
// w2-<case> for agents, s1-<case> for shells), shared by the local and
|
||||
// remote/docker launch paths so all tabs follow the same naming convention.
|
||||
@@ -2082,7 +2069,9 @@ Object.assign(CodemanApp.prototype, {
|
||||
|
||||
async runShell() {
|
||||
const caseName = document.getElementById('quickStartCase').value || 'testcase';
|
||||
const shellCount = Math.min(20, Math.max(1, parseInt(document.getElementById('shellCount').value) || 1));
|
||||
// Run Shell reads the toolbar's one instance stepper, like every other run*();
|
||||
// its own second `− 1 +` group (#shellCount) was removed (#428).
|
||||
const shellCount = this._readTabCount();
|
||||
|
||||
const ownsLaunchTerminal = this._beginSessionLaunchStatus(
|
||||
`Starting ${shellCount} Shell session(s) in ${caseName}...`,
|
||||
|
||||
Reference in New Issue
Block a user