Repository navigation
WHOOP: read the burn from Bushido, not the Totem bridge - #5
Conversation
Published from the private repository by oss-sync. - WHOOP: read the burn from Bushido, not the Totem bridge 19 files changed, 537 insertions(+), 111 deletions(-)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bef385490
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (d.draft.bushido) await save('bushido') | ||
| setResult(doTest ? await test('bushido') : { ok: true, detail: 'Saved.' }) |
There was a problem hiding this comment.
Refresh WHOOP state after saving Bushido
When Bushido is configured from this screen after the app has loaded, save() refreshes only /api/me; useWhoop() has already fetched the prior { configured: false, burn: {}, error: null } document and never fetches again. The feature flag therefore enables the energy area, but Balance renders nothing and provides no refresh button; even “Save and connect” refreshes only the server cache. The native screen mirrors this behavior, so both clients require a reload before WHOOP appears. Invalidate or refresh the client WHOOP state after saving/testing Bushido.
AGENTS.md reference: AGENTS.md:L404-L407
Useful? React with 👍 / 👎.
| async function findHabit(cfg) { | ||
| const payload = await call(cfg, 'GET', '/api/habits') | ||
| const habits = payload?.habits || payload || [] | ||
| return habits.find(h => h.id === cfg?.habit || String(h.name || '').toLowerCase() === HABIT_NAME.toLowerCase()) || null |
There was a problem hiding this comment.
Verify the configured habit ID in Settings Test
When the owner configures a non-default habit ID while Totem still contains any habit named “Krakatoa,” this fallback returns that differently identified habit. The Settings Test then reports success, although syncDay() posts to cfg.habit and will fail with an unknown habit. Keep the name fallback for migration/creation if needed, but the test must verify that the configured ID is actually present.
AGENTS.md reference: AGENTS.md:L625-L627
Useful? React with 👍 / 👎.
Published from the private repository by oss-sync.
19 files changed, 537 insertions(+), 111 deletions(-)