taskplane 0.4.1 → 0.4.2

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.
@@ -1109,6 +1109,30 @@ async function showSectionSettingsLoop(
1109
1109
  const field = section.fields.find((f) => f.configPath === result.fieldId);
1110
1110
  if (!field) continue; // Safety: field not found
1111
1111
 
1112
+ // Input fields: the submenu returned a sentinel — use ctx.ui.input() for actual editing
1113
+ if (result.rawValue === "__EDIT_REQUESTED__" && field.control === "input") {
1114
+ const state = loadConfigState(configRoot, pointerConfigRoot);
1115
+ const currentDisplay = getFieldDisplayValue(field, state.mergedConfig, state.prefs);
1116
+ const currentClean = String(currentDisplay).replace(/\s+\((?:default|project|user)\)$/, "");
1117
+ const placeholder = currentClean === "(not set)" || currentClean === "(inherit)" ? "" : currentClean;
1118
+
1119
+ const newValue = await ctx.ui.input(
1120
+ `${field.label}${field.description ? ` — ${field.description}` : ""}`,
1121
+ placeholder,
1122
+ );
1123
+
1124
+ if (newValue === null || newValue === undefined) continue; // Cancelled
1125
+
1126
+ // Validate
1127
+ const validation = validateFieldInput(field, newValue);
1128
+ if (!validation.valid) {
1129
+ ctx.ui.notify(`❌ Invalid value: ${validation.error}`, "error");
1130
+ continue;
1131
+ }
1132
+
1133
+ result.rawValue = newValue;
1134
+ }
1135
+
1112
1136
  const typedValue = coerceValueForWrite(field, result.rawValue);
1113
1137
 
1114
1138
  // Collect UI answers for the write-decision contract
@@ -1199,11 +1223,12 @@ async function showSectionSettingsOnce(
1199
1223
  item.values = field.values.map((v) => `${v} ${sourceBadge}`);
1200
1224
  }
1201
1225
 
1202
- // Input fields get a submenu for inline editing
1226
+ // Input fields: use a single-value cycling pattern instead of a submenu.
1227
+ // The inline submenu approach freezes on Windows/tmux (issue #57).
1228
+ // We set a single sentinel value so pressing Enter/Space triggers onChange,
1229
+ // which exits the TUI. The caller then uses ctx.ui.input() for actual editing.
1203
1230
  if (field.control === "input") {
1204
- item.submenu = (currentValue: string, submenuDone: (selectedValue?: string) => void) => {
1205
- return createInputSubmenu(field, currentValue, submenuDone);
1206
- };
1231
+ item.values = [`__EDIT_REQUESTED__`];
1207
1232
  }
1208
1233
 
1209
1234
  return item;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",