Skip to content

Fix all-view one-time child visibility - #70

Merged
thomasluizon merged 1 commit into
mainfrom
fix/hide-completed-one-time-children
Apr 30, 2026
Merged

thomasluizon merged 1 commit into
mainfrom
fix/hide-completed-one-time-children

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Summary

  • Hide completed one-time child habits from All view when Show Completed is off.
  • Keep completed recurring children visible and general children hidden.
  • Add shared, web, and mobile regression coverage.

Tests

  • Shared habit visibility test passed.
  • Web habit list test passed.
  • Mobile habit list test passed.
  • Type-check passed in shared, web, and mobile.

@vercel

vercel Bot commented Apr 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
orbit-ui-mobile-web Ignored Ignored Apr 30, 2026 10:56pm

@thomasluizon
thomasluizon merged commit 724637c into main Apr 30, 2026
3 checks passed
@thomasluizon
thomasluizon deleted the fix/hide-completed-one-time-children branch April 30, 2026 22:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07b0e74e1b

ℹ️ 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".

Comment on lines +37 to +39
if (habit.isGeneral) return false
if (showCompleted) return true
return !habit.isCompleted || habit.frequencyUnit !== null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep completed one-time child when descendants are visible

This predicate now removes every completed one-time child from the All view when showCompleted is off, but it does not account for descendant visibility. If a completed one-time child still has active/recurring descendants, getVisibleChildren drops that node and the UI traversal only walks returned children, so the entire subtree becomes unreachable in All view. This is a regression from the prior behavior where non-general children remained visible and their descendants could still be shown.

Useful? React with 👍 / 👎.

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