Skip to content

Sub-habits, and the web's Productivity tabs drawn like the iPhone app - #72

Merged
ehonis merged 1 commit into
mainfrom
sync/private-main
Nov 25, 2026
Merged

ehonis merged 1 commit into
mainfrom
sync/private-main

Conversation

@ehonis

@ehonis ehonis commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Published from the private repository by oss-sync.

  • Sub-habits, and the web's Productivity tabs drawn like the iPhone app

61 files changed, 5944 insertions(+), 1707 deletions(-)

Published from the private repository by oss-sync.

- Sub-habits, and the web's Productivity tabs drawn like the iPhone app

 61 files changed, 5944 insertions(+), 1707 deletions(-)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T15:12:58.526858Z 27b3249 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ehonis
ehonis merged commit ba8d601 into main Nov 25, 2026
4 checks passed
@ehonis
ehonis deleted the sync/private-main branch November 25, 2026 15:01

@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: 27b324990e

ℹ️ 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 +346 to +347
) : loading && goals.length === 0 ? (
<p className="pk-empty" role="status">Loading goals…</p>

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 Hide goals until the selected period finishes loading

When switching from a populated period to another tab or using the period arrows, goals still contains the previous period while the new request runs. Because loading is shown only when that array is empty, the old goals are rendered under the newly selected period and remain there indefinitely if the request fails; the user can then complete or edit a goal while believing it belongs to the new period. Treat any period-changing load as loading, or associate the cached goals with the query that produced them.

Useful? React with 👍 / 👎.

Comment on lines +370 to +371
await habitWrite(group.id, { date: habitDay, complete: t.complete })
pushToast(groupWords(group.name, t, 0, 0).result, 'info', {

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 Only show group success after the write succeeds

When /api/habits/log fails, habitWrite catches the error and resolves normally, so this code still displays the successful “Marked/Cleared” toast and offers Undo even though the group was not changed. This occurs on any transient bridge or validation failure from the Overview group check; return a success result from habitWrite or let it reject before showing the success toast.

Useful? React with 👍 / 👎.

// phone, so a habit with one puts its controls on a line of their own.
const crowded = Boolean(habit.metric)
const recent = recentDays(habit, entries, date).filter((d) => d.level > 0).length
const crowded = Boolean(habit.metric) && !group

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 Hide the metric control after a habit becomes a group

When a habit that already tracks a manual metric gains its first sub-habit, the metric remains on the payload. This group path sets crowded false but the shared controls block still renders HabitMetricInput, so entering a value calls /api/habits/log for the group and is always rejected because groups cannot own entries; the group form also hides metric settings, leaving no way to remove it. Guard the metric input (and group history metric) with !group or clear/refuse the metric when forming a group.

AGENTS.md reference: AGENTS.md:L75-L75

Useful? React with 👍 / 👎.

if (!saved) return
pushToast(`Removed “${item.text}”`, 'success', {
duration: 6000,
action: { label: 'Undo', onClick: () => { void send(() => addListItems(list.id, [{ text: item.text, checked: item.checked }]), { id: list.id }) } },

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 Restore deleted list items at their original position

When an item is removed from the middle of a checklist and the user clicks Undo, this recreates only its text and checked state. addListItems assigns every recreated item the next available position, so the supposedly restored item moves to the end of its open or checked section instead of returning where it was. Preserve item.position when recreating the item, or follow creation with a position update.

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