Skip to content

feat: apps settings as expandable list, aligned with the mobile app - #68

Merged
gdoumen merged 4 commits into
mainfrom
feat/trainingpeaks-integration
Nov 15, 2026
Merged

gdoumen merged 4 commits into
mainfrom
feat/trainingpeaks-integration

Conversation

@gdoumen

@gdoumen gdoumen commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Settings → Apps now works like in the mobile app: a single list instead of logo tiles with a separate settings page per app.

What changed

  • List: every entry shows the app name and a connection status dot, and expands inline (one at a time) to connect/disconnect and the operations of the app. The list is rendered from the apps provided by the apps service, so newly supported apps (e.g. TrainingPeaks) show up without UI changes.
  • Shared panel: Strava and Intervals.icu use one OAuthAppSettings component (replacing StravaSettings and IntervalsSettings). Strava keeps its official connect button. Komoot keeps its login dialog and the syncing of its operations, and uses the same settings view.
  • Operation labels match the mobile app.
  • Removed the app logos that are no longer used from the bundle (intervals.png, velo-black.png).
  • No longer logs the user name when connecting an app.
  • Unit tests and stories for the new components.
  • Review follow-up (see below).

Review follow-up

  • Komoot: connecting and disconnecting within one session and then collapsing the row threw an error (the operations were dropped when disconnecting). The operations are kept now, and nothing is reported on closing if the app was not connected before and is not connected now.
  • OAuth apps: the settings follow the connected/disconnected events of the service, so a connection that finishes while the row was collapsed is shown when it is opened again (before: green dot, but the button still said "Connect").
  • Entry header: a native <button> (accordion pattern with aria-expanded, aria-controls and a labelled region) instead of a div with key handling, and a visible focus indicator. It is deliberately not the Button atom: that is an action button (filled, 3D hover), whereas this is a list row that discloses a section.
  • Tests for all three, the first two were verified to fail on the previous version.

Notes

  • This screen still calls the apps domain service directly (there is no apps page service yet), as before.
  • Operations are still plain checkboxes; mobile uses toggle switches (no switch atom exists in web-ui).
  • Depends on the services change that removes iconUrl from the apps list and adds TrainingPeaks (draft PR with the same branch name).
  • Not part of this PR: the in-progress state is lost when a row is collapsed during an OAuth flow (the button shows "Connect" again until the flow finishes).

Test plan

  • npm test: 812 passed, production build compiles
  • Manual: Settings → Apps shows all apps, expand/collapse, status dots update after connect/disconnect
  • Manual: connect and disconnect Strava, Intervals.icu and Komoot
  • Manual: with TP_INTEGRATION enabled, TrainingPeaks appears in the list

Replace the logo tiles and the separate settings page per app with a single list: every entry shows the name and the connection status and expands to connect/disconnect and the operations of the app. The list is rendered from the apps provided by the apps service.

Strava and Intervals.icu share one OAuthAppSettings component. Komoot keeps its login dialog and uses the same settings view. The operation labels match the mobile app.

Remove the app logos that are no longer used from the bundle, and stop logging the user name when connecting.
onConnect={onConnect} onDisconnect={onDisconnect}
onOperationsChanged={onOperationsChanged}
<AppSettingsView {...settings} name='Komoot' isConnecting={connecting}
onConnect={onConnect} onDisconnect={onDisconnect}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If I connect Komoot, disconnect it, then collapse the row, the cleanup calls forEach on undefined. Can we keep the operations array when disconnecting?

const service = useAppsService()

const [connecting, setConnecting] = useState(false)
const [settings, setSettings] = useState(() => service.openAppSettings(appKey))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If I reopen this row before OAuth finishes, the dot turns green but the button still says Connect. Can we refresh the panel when the service reports the connection?

{iconUrl? <Image src={iconUrl} width='100%'/> :
<Text text={name}/>}
<Container>
<Header role='button' tabIndex={0} aria-expanded={expanded} onClick={() => onClick?.()} onKeyDown={onKeyDown}>

@joaopavila joaopavila Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we use the Button here? It already handles Enter and Space.

- Komoot: keep the operations when disconnecting and do not report any changes on closing if the app was not connected before and is not connected now (connecting and disconnecting within one session threw an error on closing)
- OAuth apps: the settings follow the connected/disconnected events of the service, so a connection that finishes while the row was collapsed is shown when it is opened again
- the header of an entry is a native button (accordion pattern: aria-expanded, aria-controls, region) instead of a div with key handling, with a visible focus indicator
@gdoumen
gdoumen marked this pull request as ready for review November 15, 2026 18:31
@gdoumen
gdoumen merged commit 239f669 into main Nov 15, 2026
2 checks passed
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.

2 participants