+ {/* Error banner */}
+ {error && (
+
+ )}
+
+ {/* Add task input */}
+
+
setNewText(e.target.value)}
+ placeholder="Add a task..."
+ aria-label="New task text"
+ maxLength={20000}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ void addItem();
+ }
+ }}
+ className="flex-1 rounded-lg border border-shell-border bg-shell-surface px-3 py-2 text-sm text-shell-text placeholder:text-shell-text-tertiary focus:outline-none focus:ring-2 focus:ring-accent/40"
+ />
+
+
+
+ {/* Incomplete items */}
+ {incomplete.length > 0 && (
+
+ {incomplete.map((item) => (
+ moveItem(id, dir, incomplete)}
+ />
+ ))}
+
+ )}
+
+ {/* Completed items (collapsed by default) */}
+ {complete.length > 0 && (
+
+
+ Completed ({complete.length})
+
+
+ {complete.map((item) => (
+ moveItem(id, dir, complete)}
+ />
+ ))}
+
+
+ )}
+
+ {/* Empty state */}
+ {items.length === 0 && (
+
+
+
+ Nothing here yet. Add your first task above.
+
+
+ )}
+