Add unified settings - #50
Conversation
- Use a drawer layout on mobile and live routes - Add shared mobile drawer breakpoint detection
- Add global and show-specific settings pages - Move connection, profile, chat, general, and update controls into settings
There was a problem hiding this comment.
All reported issues were addressed across 21 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
- Add resilient loading and error states across settings - Improve host-name changes, pairing links, and desktop updates
- Add inline profile and channel creation - Improve profile selection and notification controls - Add reusable table and input group components
- Add consistent alert dialogs for destructive actions - Reorient chat notification controls by channel and profile - Refine show navigation labels and indicators
There was a problem hiding this comment.
All reported issues were addressed across 26 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
There was a problem hiding this comment.
3 issues found across 5 files (changes from recent commits).
Confidence score: 3/5
- In
apps/web/src/components/settings/GeneralSettings.tsx, reverting a value while a prior save is still pending can be dropped, leaving the UI showing A while persisted state remains B; this is the highest regression risk because it can silently desync settings—only treat a save as skippable when no earlier save is queued. - In
apps/web/src/components/shows/ShowSwitcher.tsx, the global settings trigger label and the all-shows dropdown state can diverge (for example, showing “Connections” in one place but a different context in another), which risks user confusion and wrong-context navigation—align both surfaces to the same source of truth for the active section. - In
apps/web/src/components/connections/ConnectionDialog.tsx, clearingerroronselectedUrlchange can erase the pairing poll’s “No local network was found on this computer.” message in the same update cycle, so users may lose actionable feedback—guard error resets so polling-originated errors are preserved when candidate URLs collapse to empty.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/web/src/components/settings/GeneralSettings.tsx">
<violation number="1" location="apps/web/src/components/settings/GeneralSettings.tsx:70">
P1: Reverting an edit while its previous save is pending is dropped, so the UI can show A while the show remains persisted as B. Only skip an unchanged save when no earlier save is queued.</violation>
</file>
<file name="apps/web/src/components/shows/ShowSwitcher.tsx">
<violation number="1" location="apps/web/src/components/shows/ShowSwitcher.tsx:99">
P3: On a global settings page for the Connections or Profiles section the dropdown shows a mismatch: the trigger displays the current section label (e.g. "Connections") via globalSettingsLabel, while the bottom all-shows option — which is the active/selected item because the Select value is `showId ?? allShowsValue` and showId is undefined — is hardcoded to "Updates". So the selected option in the list reads "Updates" while the trigger reads "Connections"/"Profiles", which looks wrong and can mislead users about which section is active.</violation>
</file>
<file name="apps/web/src/components/connections/ConnectionDialog.tsx">
<violation number="1" location="apps/web/src/components/connections/ConnectionDialog.tsx:726">
P3: Resetting error whenever selectedUrl changes can wipe the "No local network was found on this computer." message the pairing poll sets in the same update: selectPairingCandidateUrl returns "" for empty candidates, so when a selected URL transitions to empty the new setError(undefined) runs right after and clears the just-set error (rendered at line ~805). Consider clearing error only for non-empty URL changes, or resetting it in the poll instead so the no-local-network feedback survives.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| setName(committed.current.name); | ||
| return; | ||
| } | ||
| if (trimmed === committed.current.name && nextColor === committed.current.color) return; |
There was a problem hiding this comment.
P1: Reverting an edit while its previous save is pending is dropped, so the UI can show A while the show remains persisted as B. Only skip an unchanged save when no earlier save is queued.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/src/components/settings/GeneralSettings.tsx, line 70:
<comment>Reverting an edit while its previous save is pending is dropped, so the UI can show A while the show remains persisted as B. Only skip an unchanged save when no earlier save is queued.</comment>
<file context>
@@ -59,19 +59,15 @@ function GeneralSettingsLoaded({ show }: { readonly show: ShowListItem }) {
return;
}
- if (trimmed === show.name && nextColor === show.color) return;
+ if (trimmed === committed.current.name && nextColor === committed.current.color) return;
pendingSaves.current += 1;
setSaving(true);
</file context>
| if (trimmed === committed.current.name && nextColor === committed.current.color) return; | |
| if ( | |
| pendingSaves.current === 0 && | |
| trimmed === committed.current.name && | |
| nextColor === committed.current.color | |
| ) | |
| return; |
| <ArrowLeftIcon className="size-3.5" /> | ||
| )} | ||
| </span> | ||
| <span>{destination === "settings" ? "Updates" : "All shows"}</span> |
There was a problem hiding this comment.
P3: On a global settings page for the Connections or Profiles section the dropdown shows a mismatch: the trigger displays the current section label (e.g. "Connections") via globalSettingsLabel, while the bottom all-shows option — which is the active/selected item because the Select value is showId ?? allShowsValue and showId is undefined — is hardcoded to "Updates". So the selected option in the list reads "Updates" while the trigger reads "Connections"/"Profiles", which looks wrong and can mislead users about which section is active.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/src/components/shows/ShowSwitcher.tsx, line 99:
<comment>On a global settings page for the Connections or Profiles section the dropdown shows a mismatch: the trigger displays the current section label (e.g. "Connections") via globalSettingsLabel, while the bottom all-shows option — which is the active/selected item because the Select value is `showId ?? allShowsValue` and showId is undefined — is hardcoded to "Updates". So the selected option in the list reads "Updates" while the trigger reads "Connections"/"Profiles", which looks wrong and can mislead users about which section is active.</comment>
<file context>
@@ -86,7 +96,7 @@ export function ShowSwitcher({
)}
</span>
- <span>{destination === "settings" ? "General" : "All shows"}</span>
+ <span>{destination === "settings" ? "Updates" : "All shows"}</span>
</span>
</SelectItem>
</file context>
| <span>{destination === "settings" ? "Updates" : "All shows"}</span> | |
| <span>{destination === "settings" ? globalSettingsLabel : "All shows"}</span> |
| React.useEffect(() => { | ||
| setQrCode(undefined); | ||
| setCopied(false); | ||
| setError(undefined); |
There was a problem hiding this comment.
P3: Resetting error whenever selectedUrl changes can wipe the "No local network was found on this computer." message the pairing poll sets in the same update: selectPairingCandidateUrl returns "" for empty candidates, so when a selected URL transitions to empty the new setError(undefined) runs right after and clears the just-set error (rendered at line ~805). Consider clearing error only for non-empty URL changes, or resetting it in the poll instead so the no-local-network feedback survives.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/src/components/connections/ConnectionDialog.tsx, line 726:
<comment>Resetting error whenever selectedUrl changes can wipe the "No local network was found on this computer." message the pairing poll sets in the same update: selectPairingCandidateUrl returns "" for empty candidates, so when a selected URL transitions to empty the new setError(undefined) runs right after and clears the just-set error (rendered at line ~805). Consider clearing error only for non-empty URL changes, or resetting it in the poll instead so the no-local-network feedback survives.</comment>
<file context>
@@ -723,6 +723,7 @@ function PairClientPopover({
React.useEffect(() => {
setQrCode(undefined);
setCopied(false);
+ setError(undefined);
if (!selectedUrl) return;
let active = true;
</file context>
Summary
Testing