Spaces:
Sleeping
chore: remove Max Participants debug instrumentation (verified working)
Browse filesReverts the temporary fetch()-based debug instrumentation added in
a808caa (the "Debug instrumentation" section of that commit's message):
* frontend/src/App.js (handleMaxParticipantsChange):
- Removed the `// #region agent log` POST to 127.0.0.1:7660 that
forwarded n / clamped / prev maxParticipants state to the local
debug server.
- Reverted the useCallback deps from [selectedIds, maxParticipants]
back to [selectedIds]; `maxParticipants` was only in the deps
because the instrumentation closed over it.
* frontend/src/components/DevMenu.js:
- Removed the panel-open render-snapshot useEffect that POSTed to
127.0.0.1:7660.
- Restored the +/- stepper button onClick handlers to their original
one-liner form (Math.max(3, ...) / Math.min(9, ...)), removing the
wrapped click handlers that POSTed click-snapshots to the debug
server.
All non-instrumentation changes from a808caa (DownloadMenu split,
Header prop wiring fix for maxParticipants, settings-menu restructure,
theme toggle, contrast tweaks, etc.) are preserved.
No production code paths reference 127.0.0.1:7660,
b27d4bb5-c1ab-4767-aa98-1cdf1e8fb0ae, X-Debug-Session-Id, or session
id 896623 anymore. The debug-896623.log file was not present in the
working tree or git index, so no file deletion was needed.
Co-authored-by: Cursor <cursoragent@cursor.com>
- frontend/src/App.js +1 -24
- frontend/src/components/DevMenu.js +2 -77
|
@@ -191,34 +191,11 @@ export default function App() {
|
|
| 191 |
}, []);
|
| 192 |
const handleMaxParticipantsChange = useCallback((n) => {
|
| 193 |
const clamped = Math.max(3, Math.min(9, n));
|
| 194 |
-
// #region agent log
|
| 195 |
-
fetch('http://127.0.0.1:7660/ingest/b27d4bb5-c1ab-4767-aa98-1cdf1e8fb0ae', {
|
| 196 |
-
method: 'POST',
|
| 197 |
-
headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '896623' },
|
| 198 |
-
body: JSON.stringify({
|
| 199 |
-
sessionId: '896623',
|
| 200 |
-
runId: 'maxparticipants-repro',
|
| 201 |
-
hypothesisId: 'H2',
|
| 202 |
-
location: 'App.js:handleMaxParticipantsChange',
|
| 203 |
-
message: 'Parent handler invoked',
|
| 204 |
-
data: {
|
| 205 |
-
n,
|
| 206 |
-
nType: typeof n,
|
| 207 |
-
nIsNaN: Number.isNaN(n),
|
| 208 |
-
clamped,
|
| 209 |
-
clampedIsNaN: Number.isNaN(clamped),
|
| 210 |
-
prevMaxParticipants: maxParticipants,
|
| 211 |
-
prevMaxParticipantsType: typeof maxParticipants,
|
| 212 |
-
},
|
| 213 |
-
timestamp: Date.now(),
|
| 214 |
-
}),
|
| 215 |
-
}).catch(() => {});
|
| 216 |
-
// #endregion
|
| 217 |
setMaxParticipants(clamped);
|
| 218 |
if (selectedIds.length > clamped) {
|
| 219 |
setSelectedIds(prev => prev.slice(0, clamped));
|
| 220 |
}
|
| 221 |
-
}, [selectedIds
|
| 222 |
const handleModelAssignmentChange = useCallback((participantId, modelId) => {
|
| 223 |
setModelAssignments(prev => {
|
| 224 |
const next = { ...prev };
|
|
|
|
| 191 |
}, []);
|
| 192 |
const handleMaxParticipantsChange = useCallback((n) => {
|
| 193 |
const clamped = Math.max(3, Math.min(9, n));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
setMaxParticipants(clamped);
|
| 195 |
if (selectedIds.length > clamped) {
|
| 196 |
setSelectedIds(prev => prev.slice(0, clamped));
|
| 197 |
}
|
| 198 |
+
}, [selectedIds]);
|
| 199 |
const handleModelAssignmentChange = useCallback((participantId, modelId) => {
|
| 200 |
setModelAssignments(prev => {
|
| 201 |
const next = { ...prev };
|
|
@@ -90,31 +90,6 @@ export default function DevMenu({
|
|
| 90 |
});
|
| 91 |
}, [allModels, q]);
|
| 92 |
|
| 93 |
-
// #region agent log
|
| 94 |
-
useEffect(() => {
|
| 95 |
-
if (!open) return;
|
| 96 |
-
fetch('http://127.0.0.1:7660/ingest/b27d4bb5-c1ab-4767-aa98-1cdf1e8fb0ae', {
|
| 97 |
-
method: 'POST',
|
| 98 |
-
headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '896623' },
|
| 99 |
-
body: JSON.stringify({
|
| 100 |
-
sessionId: '896623',
|
| 101 |
-
runId: 'maxparticipants-repro',
|
| 102 |
-
hypothesisId: 'H1',
|
| 103 |
-
location: 'DevMenu.js:render',
|
| 104 |
-
message: 'DevMenu render snapshot (panel open)',
|
| 105 |
-
data: {
|
| 106 |
-
maxParticipants,
|
| 107 |
-
maxParticipantsType: typeof maxParticipants,
|
| 108 |
-
onMaxParticipantsChangeType: typeof onMaxParticipantsChange,
|
| 109 |
-
ge9: maxParticipants >= 9,
|
| 110 |
-
le3: maxParticipants <= 3,
|
| 111 |
-
},
|
| 112 |
-
timestamp: Date.now(),
|
| 113 |
-
}),
|
| 114 |
-
}).catch(() => {});
|
| 115 |
-
}, [open, maxParticipants, onMaxParticipantsChange]);
|
| 116 |
-
// #endregion
|
| 117 |
-
|
| 118 |
const nameForModel = (id) => {
|
| 119 |
if (!id) return null;
|
| 120 |
const m = allModels.find(x => x.id === id);
|
|
@@ -190,63 +165,13 @@ export default function DevMenu({
|
|
| 190 |
<button
|
| 191 |
className="btn-sm btn-outline ccai-stepper-btn"
|
| 192 |
disabled={maxParticipants <= 3}
|
| 193 |
-
onClick={() =>
|
| 194 |
-
const next = Math.max(3, maxParticipants - 1);
|
| 195 |
-
// #region agent log
|
| 196 |
-
fetch('http://127.0.0.1:7660/ingest/b27d4bb5-c1ab-4767-aa98-1cdf1e8fb0ae', {
|
| 197 |
-
method: 'POST',
|
| 198 |
-
headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '896623' },
|
| 199 |
-
body: JSON.stringify({
|
| 200 |
-
sessionId: '896623',
|
| 201 |
-
runId: 'maxparticipants-repro',
|
| 202 |
-
hypothesisId: 'H1',
|
| 203 |
-
location: 'DevMenu.js:onMinusClick',
|
| 204 |
-
message: 'Minus button clicked',
|
| 205 |
-
data: {
|
| 206 |
-
maxParticipants,
|
| 207 |
-
maxParticipantsType: typeof maxParticipants,
|
| 208 |
-
next,
|
| 209 |
-
nextType: typeof next,
|
| 210 |
-
nextIsNaN: Number.isNaN(next),
|
| 211 |
-
onMaxParticipantsChangeType: typeof onMaxParticipantsChange,
|
| 212 |
-
},
|
| 213 |
-
timestamp: Date.now(),
|
| 214 |
-
}),
|
| 215 |
-
}).catch(() => {});
|
| 216 |
-
// #endregion
|
| 217 |
-
onMaxParticipantsChange(next);
|
| 218 |
-
}}
|
| 219 |
>−</button>
|
| 220 |
<div className="ccai-stepper-val">{maxParticipants}</div>
|
| 221 |
<button
|
| 222 |
className="btn-sm btn-outline ccai-stepper-btn"
|
| 223 |
disabled={maxParticipants >= 9}
|
| 224 |
-
onClick={() =>
|
| 225 |
-
const next = Math.min(9, maxParticipants + 1);
|
| 226 |
-
// #region agent log
|
| 227 |
-
fetch('http://127.0.0.1:7660/ingest/b27d4bb5-c1ab-4767-aa98-1cdf1e8fb0ae', {
|
| 228 |
-
method: 'POST',
|
| 229 |
-
headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '896623' },
|
| 230 |
-
body: JSON.stringify({
|
| 231 |
-
sessionId: '896623',
|
| 232 |
-
runId: 'maxparticipants-repro',
|
| 233 |
-
hypothesisId: 'H1',
|
| 234 |
-
location: 'DevMenu.js:onPlusClick',
|
| 235 |
-
message: 'Plus button clicked',
|
| 236 |
-
data: {
|
| 237 |
-
maxParticipants,
|
| 238 |
-
maxParticipantsType: typeof maxParticipants,
|
| 239 |
-
next,
|
| 240 |
-
nextType: typeof next,
|
| 241 |
-
nextIsNaN: Number.isNaN(next),
|
| 242 |
-
onMaxParticipantsChangeType: typeof onMaxParticipantsChange,
|
| 243 |
-
},
|
| 244 |
-
timestamp: Date.now(),
|
| 245 |
-
}),
|
| 246 |
-
}).catch(() => {});
|
| 247 |
-
// #endregion
|
| 248 |
-
onMaxParticipantsChange(next);
|
| 249 |
-
}}
|
| 250 |
>+</button>
|
| 251 |
<span className="dev-panel-hint">3-9</span>
|
| 252 |
</div>
|
|
|
|
| 90 |
});
|
| 91 |
}, [allModels, q]);
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
const nameForModel = (id) => {
|
| 94 |
if (!id) return null;
|
| 95 |
const m = allModels.find(x => x.id === id);
|
|
|
|
| 165 |
<button
|
| 166 |
className="btn-sm btn-outline ccai-stepper-btn"
|
| 167 |
disabled={maxParticipants <= 3}
|
| 168 |
+
onClick={() => onMaxParticipantsChange(Math.max(3, maxParticipants - 1))}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
>−</button>
|
| 170 |
<div className="ccai-stepper-val">{maxParticipants}</div>
|
| 171 |
<button
|
| 172 |
className="btn-sm btn-outline ccai-stepper-btn"
|
| 173 |
disabled={maxParticipants >= 9}
|
| 174 |
+
onClick={() => onMaxParticipantsChange(Math.min(9, maxParticipants + 1))}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
>+</button>
|
| 176 |
<span className="dev-panel-hint">3-9</span>
|
| 177 |
</div>
|