fix(ui): remove over-polling from plan view to prevent infinite loops

This commit is contained in:
2026-05-19 16:24:15 -07:00
parent 2e02d3d8c6
commit c97e8555e3

View File

@@ -104,9 +104,9 @@ const SECTIONS: SectionDef[] = [
},
{
key: "tasks",
label: "Tasks",
label: "Features",
icon: ListTodo,
blurb: "What needs to happen next.",
blurb: "High-level capabilities to be delegated to the AI.",
},
{
key: "decisions",
@@ -155,7 +155,9 @@ export default function PlanTab() {
useEffect(() => {
load();
const intervalId = setInterval(load, 5000);
// Only poll the plan API periodically if we aren't currently editing or saving
// something, otherwise we risk overwriting user input or causing layout thrashing.
const intervalId = setInterval(load, 15000); // Backed off from 5s to 15s to reduce API spam
return () => clearInterval(intervalId);
}, [load]);
@@ -1205,7 +1207,7 @@ function TasksPanel({
return (
<div>
<div style={visionHeaderRow}>
<h3 style={panelTitle}>Tasks</h3>
<h3 style={panelTitle}>Features</h3>
<button
onClick={() => {
setCreating(true);
@@ -1213,7 +1215,7 @@ function TasksPanel({
}}
style={primaryBtn}
>
<Plus size={13} /> New task
<Plus size={13} /> New Feature
</button>
</div>
@@ -1241,7 +1243,7 @@ function TasksPanel({
<div style={{ ...emptyBox, marginTop: 0 }}>
{tasks.length === 0 ? (
<>
No tasks yet.
No features defined yet.
<span
style={{
display: "block",
@@ -1250,11 +1252,11 @@ function TasksPanel({
fontSize: "0.8rem",
}}
>
Ask the AI to break down your first feature it will create
scoped tasks automatically.
Ask the AI to break down your objective it will create
scoped features automatically.
</span>
<span style={promptNudge}>
Try: &quot;Add user authentication to my app&quot;
Try: &quot;Draft the features for this app&quot;
</span>
</>
) : (
@@ -1465,7 +1467,7 @@ function TaskDetail({
onClick={async () => {
if (
!confirm(
`Delegate "${task.title}" to an autonomous agent? It will execute this task in the background and commit the results.`,
`Delegate feature "${task.title}" to an autonomous agent? It will execute this in the background, test it, and deploy.`,
)
)
return;