Skip to content

Add unified settings - #50

Open
johannesschiessl wants to merge 6 commits into
mainfrom
t3code/unified-settings-routes
Open

Add unified settings#50
johannesschiessl wants to merge 6 commits into
mainfrom
t3code/unified-settings-routes

Conversation

@johannesschiessl

Copy link
Copy Markdown
Member

Summary

  • Add shared global and show-specific settings routes.
  • Consolidate connection management into the settings UI.
  • Add chat, general, profile, and update settings pages.
  • Add show/profile switchers and settings navigation.

Testing

  • Not run.

- 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
@johannesschiessl
johannesschiessl marked this pull request as draft August 6, 2026 11:10

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread apps/web/src/components/settings/ChatSettings.tsx Outdated
Comment thread apps/web/src/components/settings/SettingsLayout.tsx Outdated
Comment thread apps/web/src/components/settings/GeneralSettings.tsx Outdated
Comment thread apps/web/src/components/settings/GeneralSettings.tsx Outdated
Comment thread apps/web/src/components/connections/ConnectionDialog.tsx Outdated
Comment thread apps/web/src/components/settings/GeneralSettings.tsx Outdated
Comment thread apps/web/src/components/settings/ChatSettings.tsx Outdated
Comment thread apps/web/src/components/settings/UpdatesSettings.tsx Outdated
Comment thread apps/web/src/components/settings/UpdatesSettings.tsx Outdated
Comment thread apps/web/src/components/connections/ConnectionDialog.tsx Outdated
@johannesschiessl
johannesschiessl changed the base branch from feature/responsive-connection-controls to main August 8, 2026 18:42
- 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
@johannesschiessl johannesschiessl changed the title Add unified settings routes Add unified settings Aug 8, 2026
@johannesschiessl
johannesschiessl marked this pull request as ready for review August 8, 2026 20:31

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread apps/web/src/components/profiles/ProfileSwitcher.tsx
Comment thread apps/web/src/components/shows/ShowSwitcher.tsx
Comment thread apps/web/src/components/settings/GeneralSettings.tsx Outdated
Comment thread apps/web/src/components/settings/ChatSettings.tsx
Comment thread apps/web/src/components/connections/ConnectionDialog.tsx Outdated
Comment thread apps/web/src/components/settings/GeneralSettings.tsx Outdated
Comment thread apps/web/src/components/connections/ConnectionDialog.tsx

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, clearing error on selectedUrl change 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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
<span>{destination === "settings" ? "Updates" : "All shows"}</span>
<span>{destination === "settings" ? globalSettingsLabel : "All shows"}</span>

React.useEffect(() => {
setQrCode(undefined);
setCopied(false);
setError(undefined);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant