Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Settings: the pencil on your own colour opens the picker again

Duarte Santos6deb4cc363e8
diff --git a/frontend/src/accent-swatch.test.js b/frontend/src/accent-swatch.test.js
new file mode 100644
index 000000000..1f98ecbc1
--- /dev/null
+++ b/frontend/src/accent-swatch.test.js
@@ -0,0 +1,14 @@
+import { describe, expect, it } from 'vitest'
+import { readFileSync } from 'node:fs'
+import { resolve } from 'node:path'
+
+describe('the own colour swatch takes the tap', () => {
+ // QA round 2 (2026-10-06): the selection ring (.swatch.on::after) lay over the invisible colour
+ // input, so once an own colour was set a tap on its swatch never opened the picker.
+ it('the selection ring lets taps through to the colour input under it', () => {
+ const css = readFileSync(resolve(process.cwd(), 'src/index.css'), 'utf8').replace(/\/\*[\s\S]*?\*\//g, '')
+ const rule = css.match(/\.swatch\.on::after\{([^}]*)\}/)?.[1] || ''
+ expect(rule).toMatch(/position:absolute/)
+ expect(rule).toMatch(/pointer-events:none/)
+ })
+})
diff --git a/frontend/src/index.css b/frontend/src/index.css
index b4f968028..f412a83b0 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -1694,7 +1694,8 @@ body.no-tabbar.resting #toast{bottom:calc(100px + var(--sab))}
.swatches{display:flex;gap:12px;flex-wrap:wrap}
.swatch{width:32px;height:32px;border-radius:50%;flex:none;position:relative;transition:transform var(--fast)}
.swatch:active{transform:scale(.9)}
-.swatch.on::after{content:'';position:absolute;inset:-4px;border-radius:50%;box-shadow:0 0 0 2px var(--label)}
+/* The ring takes no taps: over the own colour it lay on the colour input, so the picker never opened. */
+.swatch.on::after{content:'';position:absolute;inset:-4px;border-radius:50%;box-shadow:0 0 0 2px var(--label);pointer-events:none}
/* The user's own colour (Settings → Accent color): a rainbow ring until there is one, then filled
with it. The native colour input lies over it, invisible, so the tap lands on the input itself. */
.swatch-own{display:inline-flex;align-items:center;justify-content:center;font-size:15px;--icon-stroke:2.4}