Skip to content

docs(readme): improve instructions - #42

Merged
Alejandroq12 merged 2 commits into
devfrom
docs/complete-readme
Aug 10, 2026
Merged

docs(readme): improve instructions#42
Alejandroq12 merged 2 commits into
devfrom
docs/complete-readme

Conversation

@Alejandroq12

@Alejandroq12 Alejandroq12 commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation
    • Clarified the app description, technology stack, setup process, and Node.js requirements.
    • Added guidance for environment-variable security and Vercel deployment.
    • Expanded documentation on architecture, accessibility, API behavior, filtering, notifications, and deployment.
    • Documented the code-generation workflow, rationale, implementation details, bonus features, and additional notes.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
task-flow Ready Ready Preview Aug 10, 2026 2:38pm

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6935ba97-e27c-4cd6-9c72-77ed8b196c00

📥 Commits

Reviewing files that changed from the base of the PR and between 38677fb and 328dd87.

📒 Files selected for processing (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

📝 Walkthrough

Walkthrough

README.md was updated with clearer application, technology, setup, deployment, architecture, feature, accessibility, API, filtering, notification, and Node.js documentation.

Changes

README documentation

Layer / File(s) Summary
Application and technology stack
README.md
The README clarifies the app description, technology stack, CI/CD, Vercel integration, Node 24.14.1 requirement, and GraphQL code generation.
Setup and deployment documentation
README.md
Setup and deployment instructions now cover generated code, environment variables, token security, HTTPS enforcement, Vercel proxy configuration, and the documented open-relay risk.
Architecture and feature documentation
README.md
The README expands architecture rationale, data-fetching behavior, implemented features, animation and due-date rules, accessibility considerations, API behavior, filtering, notifications, and additional notes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • Alejandroq12/task-flow#41: Updates README.md with related deployment, environment-variable, architecture, and implementation documentation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies a README documentation update that improves the project's instructions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/complete-readme

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 36: Update both README instructions describing when to run code
generation so they include API schema changes alongside query and mutation
changes. Keep the existing environment-variable requirement and cloning/setup
guidance unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cdd897a8-6aba-4c2e-b730-61b322fe9dac

📥 Commits

Reviewing files that changed from the base of the PR and between 86ae8c6 and 38677fb.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated
@claude

claude Bot commented Aug 10, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@Alejandroq12
Alejandroq12 merged commit e250883 into dev Aug 10, 2026
5 checks passed
@stevenheffner

Copy link
Copy Markdown

Review summary

Context: I reviewed the full submission — code and deployed app.

Good work to name first: the serverless token proxy is real and verified — every GraphQL request goes to your own /graphql with no Authorization header in the browser; you were the only candidate who treated the API token as a secret. The URL-param validation before casts, the query key that includes the full filter input, dialog focus hooks with correct cleanup and focus-return, zero unnecessary effects, and zero stale-closure or index-key mistakes anywhere. The engineering process around the code — issues, kanban, CI per PR, Dependabot — reads like professional practice.

The most important fixes, in order:

  1. Make success notifications visible (PR Feature/mutations #36) — the wiring exists; nothing renders.
  2. Unify the mobile/desktop submit gates (PR Feature/mutations #36).
  3. Guard the proxy's upstream fetch (PR Fix 404 error #34).
  4. Replace the post-create DOM polling with a ref-driven scroll and cancel the timers (PR Feature/bonus points #39).

One consolidation: the invalidate + notify + close trio is repeated in CreateTaskModal, EditTaskModal, and DeleteTaskDialog — one useTaskMutation(document, messages) hook would hold the pattern in a single place. And the CreateTask/UpdateTask documents repeat the same nine-field selection set — a shared GraphQL fragment removes the drift risk.

@Alejandroq12

Copy link
Copy Markdown
Owner Author

@stevenheffner Thank you, Steven, really appreciate the detailed review. I'm in the middle of the backend track this week with things due tomorrow, so I'll start working through these four right after, beginning with the notifications. Will keep improving, delivering and putting the effort each day.

@Alejandroq12

Copy link
Copy Markdown
Owner Author

@CodeRabbit open an issue about the feedback received. I must tackle this up starting with the most important ones.
Can you also check the comments made by Steven on others’ pull request? If the answer is yes, open an issue for every single proposal with a link to where the comment is for me to be able to verify what you write against his comment/feedback.
if the answer is no I will look for them on my own but let me know.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"
author="stevenheffner"

printf '%s\n' '== Pull requests =='
gh pr list --repo "$repo" --state all --limit 100 \
  --json number,title,url,state \
  --jq '.[] | "#\(.number) [\(.state)] \(.title) \(.url)"'

printf '%s\n' '== Top-level PR/issue comments by reviewer =='
gh api --paginate "repos/$repo/issues/comments?per_page=100" \
  --jq --arg author "$author" \
  '.[] | select(.user.login == $author) | {
    id,
    html_url,
    issue_url,
    created_at,
    body
  }'

printf '%s\n' '== Inline PR review comments by reviewer =='
gh api --paginate "repos/$repo/pulls/comments?per_page=100" \
  --jq --arg author "$author" \
  '.[] | select(.user.login == $author) | {
    id,
    html_url,
    pull_request_url,
    path,
    line,
    original_line,
    created_at,
    body
  }'

printf '%s\n' '== Existing issues that may already track the feedback =='
gh issue list --repo "$repo" --state all --limit 100 \
  --json number,title,url,state,body \
  --jq '.[] | "#\(.number) [\(.state)] \(.title) \(.url)\n\(.body)\n---"'

Length of output: 5107


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"
author="stevenheffner"

printf '%s\n' '== Top-level PR and issue comments by stevenheffner =='
gh api --paginate "repos/$repo/issues/comments?per_page=100" |
  jq -c --arg author "$author" '
    .[] | select(.user.login == $author) | {
      html_url,
      issue_url,
      created_at,
      body
    }
  '

printf '%s\n' '== Inline PR review comments by stevenheffner =='
gh api --paginate "repos/$repo/pulls/comments?per_page=100" |
  jq -c --arg author "$author" '
    .[] | select(.user.login == $author) | {
      html_url,
      pull_request_url,
      path,
      line,
      original_line,
      created_at,
      body
    }
  '

printf '%s\n' '== Existing GitHub issue titles =='
gh issue list --repo "$repo" --state all --limit 100 \
  --json number,title,url,state \
  --jq '.[] | "#\(.number) [\(.state)] \(.title) \(.url)"'

Length of output: 9947


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"
assignee="Alejandroq12"

create_issue() {
  local title="$1"
  local body="$2"
  local url

  url=$(gh issue create \
    --repo "$repo" \
    --assignee "$assignee" \
    --title "$title" \
    --body "$body")
  printf '%s\n' "$url"
}

create_issue \
  "Render accessible success notification toasts" \
  $'## Summary\nRender transient success toasts from the existing `notify()` calls. Keep the notification bell as the notification history.\n\n## Required changes\n- Render a transient toast when `notify(..., \'success\')` is called.\n- Add `aria-live=\"polite\"` to the toast container.\n- Preserve the notification bell history.\n\n## Affected areas\n- `notifications.tsx`\n- `NotificationsBell.tsx`\n\n## Acceptance criteria\n- A success mutation visibly reports completion without opening the bell panel.\n- Screen readers announce the toast.\n- The bell continues to show notification history.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/36#issuecomment-5275227488\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/36\n- Requested by: `@Alejandroq12`'

create_issue \
  "Use one submit enabling condition in TaskForm" \
  $'## Summary\nMake the mobile and desktop `TaskForm` submit buttons use the same enabling condition.\n\n## Required changes\n- Use one shared condition for both submit buttons.\n- Choose one consistent behavior: disable both until the form is valid, or enable both and show the click-time validation message.\n\n## Affected areas\n- `TaskForm.tsx`\n\n## Acceptance criteria\n- Mobile and desktop buttons have the same enabled state for the same form data.\n- Validation behavior remains correct after submission.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/36#issuecomment-5275227578\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/36\n- Requested by: `@Alejandroq12`'

create_issue \
  "Store the dialog opener with useRef" \
  $'## Summary\nReplace the unused `useState` setter for the dialog opener with a `useRef`.\n\n## Required changes\n- Store `document.activeElement` as the dialog opener in a ref.\n- Preserve focus return and cleanup behavior.\n\n## Affected areas\n- `use-dialog-focus.ts`\n\n## Acceptance criteria\n- The opener is tracked without an unused state setter.\n- Dialog close still returns focus to the opener.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/36#issuecomment-5275227578\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/36\n- Requested by: `@Alejandroq12`'

create_issue \
  "Extract repeated TaskForm popover fields" \
  $'## Summary\nExtract the repeated popover field markup in `TaskForm` into a reusable `PopoverField` component.\n\n## Required changes\n- Replace the five repeated button, `aria-expanded`, and `MenuPanel` field blocks with one component.\n- Preserve all current labels, values, menu behavior, and accessibility attributes.\n\n## Affected areas\n- `TaskForm.tsx`\n\n## Acceptance criteria\n- Each existing popover field behaves as before.\n- Common popover structure is defined once.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/36#issuecomment-5275227578\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/36\n- Requested by: `@Alejandroq12`'

create_issue \
  "Simplify Header URL query synchronization" \
  $'## Summary\nEvaluate replacing the guarded effect that synchronizes the URL query to `Header` local input state with a simpler representation.\n\n## Required changes\n- Consider `key={urlQuery}` remounting or a fully derived input value.\n- Keep behavior unchanged if the existing implementation remains necessary.\n\n## Affected areas\n- `Header.tsx`\n\n## Acceptance criteria\n- The search input remains synchronized with the URL query.\n- The implementation does not need a ref-guarded synchronization effect, unless a documented constraint requires it.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/37#issuecomment-5275227674\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/37\n- Requested by: `@Alejandroq12`'

create_issue \
  "Replace post-create DOM polling with ref-driven scrolling" \
  $'## Summary\nRemove the `document.querySelector` retry loop after task creation. Use React-owned state and refs to scroll the created card into view.\n\n## Required changes\n- Track the created task identifier.\n- Scroll the matching task card into view with a ref-driven approach.\n- If timers remain, cancel them when the component unmounts.\n\n## Affected areas\n- `CreateTaskModal.tsx`\n- Task card component\n\n## Acceptance criteria\n- The new task card scrolls into view after creation.\n- No timer continues after the modal unmounts.\n- The implementation does not poll the DOM for the task card.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/39#issuecomment-5275227780\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/39\n- Requested by: `@Alejandroq12`'

create_issue \
  "Correct README claims about task-card scroll motion" \
  $'## Summary\nAlign the README animation documentation with the current scroll behavior.\n\n## Required changes\n- Correct the statement that reduced motion makes scrolling instant, unless a smooth default is implemented.\n- Document the actual scroll behavior accurately.\n\n## Affected areas\n- `README.md`\n- Scroll styling or task-card scroll implementation, if behavior is changed\n\n## Acceptance criteria\n- Documentation matches the behavior of `scrollIntoView({ block: \'center\' })`.\n- If reduced-motion behavior is documented, the default and reduced-motion paths are both implemented and accurate.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/39#issuecomment-5275227780\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/39\n- Requested by: `@Alejandroq12`'

create_issue \
  "Correct README claim about new task-card animation" \
  $'## Summary\nAlign the README claim that only the new task card animates with the actual first-mount behavior.\n\n## Required changes\n- Either change the implementation so only the created card animates, or correct the README.\n\n## Affected areas\n- `README.md`\n- Task card animation implementation, if behavior is changed\n\n## Acceptance criteria\n- Documentation accurately describes card animation behavior.\n- If the documentation keeps the “only the new card” claim, first-mount behavior satisfies that claim.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/39#issuecomment-5275227780\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/39\n- Requested by: `@Alejandroq12`'

create_issue \
  "Remove unused Figma color tokens" \
  $'## Summary\nRemove unused `--color-sg-*` CSS tokens from the Figma extraction.\n\n## Required changes\n- Delete unused `--color-sg-*` variables.\n- Retain variables that have active references, including `--color-sg-focused`.\n\n## Affected areas\n- `src/index.css`\n\n## Acceptance criteria\n- Every retained `--color-sg-*` token has a current use.\n- The application styling remains unchanged.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/20#issuecomment-5275227882\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/20\n- Requested by: `@Alejandroq12`'

create_issue \
  "Return GraphQL-formatted errors for upstream proxy failures" \
  $'## Summary\nHandle upstream `fetch` failures in the GraphQL proxy and return the existing client-readable GraphQL error shape.\n\n## Required changes\n- Wrap the upstream `fetch(apiUrl, ...)` call in error handling.\n- Return `{ errors: [...] }` JSON with HTTP status 502 when the upstream request throws.\n\n## Affected areas\n- `api/graphql.ts`\n\n## Acceptance criteria\n- Network, DNS, and timeout failures do not produce an opaque platform 500 response.\n- The response has HTTP status 502 and the expected JSON `errors` shape.\n- The client error path can render the failure.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/34#issuecomment-5275227971\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/34\n- Requested by: `@Alejandroq12`'

create_issue \
  "Consolidate task mutation completion handling" \
  $'## Summary\nExtract the repeated task mutation completion sequence into `useTaskMutation(document, messages)`.\n\n## Required changes\n- Centralize query invalidation, notification, and dialog close behavior.\n- Replace duplicated mutation completion logic in each task mutation UI.\n\n## Affected areas\n- `CreateTaskModal`\n- `EditTaskModal`\n- `DeleteTaskDialog`\n- New `useTaskMutation` hook\n\n## Acceptance criteria\n- The three task mutation flows use the shared hook.\n- Invalidate, notify, and close behavior remains unchanged.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/42#issuecomment-5275228066\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/42\n- Requested by: `@Alejandroq12`'

create_issue \
  "Share the task mutation GraphQL selection set" \
  $'## Summary\nDefine a shared GraphQL fragment for the repeated nine-field selection set in the create-task and update-task documents.\n\n## Required changes\n- Extract the common task selection set into a GraphQL fragment.\n- Use the fragment in the create-task and update-task mutations.\n\n## Affected areas\n- Create-task GraphQL document\n- Update-task GraphQL document\n- Shared GraphQL fragment\n\n## Acceptance criteria\n- The repeated nine-field task selection set is defined once.\n- Create and update mutations retain their current response fields.\n\n## Source\n- Review comment: https://github.com/Alejandroq12/task-flow/pull/42#issuecomment-5275228066\n- Pull request: https://github.com/Alejandroq12/task-flow/pull/42\n- Requested by: `@Alejandroq12`'

Length of output: 10739


@Alejandroq12, I created and assigned 12 issues to you. Each issue links to Steven’s source comment.

Priority order from Steven’s review summary:

  1. #50 Render accessible success notification toasts
  2. #51 Use one submit enabling condition in TaskForm
  3. #59 Return GraphQL-formatted errors for upstream proxy failures
  4. #55 Replace post-create DOM polling with ref-driven scrolling

Other proposals:

I found no inline pull request comments from Steven. The issues cover the distinct proposals in his top-level comments.

You are interacting with an AI system.

@Alejandroq12

Alejandroq12 commented Aug 29, 2026

Copy link
Copy Markdown
Owner Author

@CodeRabbit great job! Now go to each issue and at the bottom of each add a comment, a technical one about what should I know before fixing each issue, short a concise, the objective is to help me skill up, become a better engineer and have fun coding, if possible add a link to an interesting article that by reading it will allow me to fix the issue with better judgement and code quality.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"

for number in $(seq 50 61); do
  echo "=== ISSUE #${number} ==="
  gh issue view "$number" --repo "$repo" --json number,title,url,body,comments \
    --jq '{
      number,
      title,
      url,
      body,
      comments: [.comments[] | {author: .author.login, body, url}]
    }'
done

Length of output: 524


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"

for number in 50 51 52 53 54 55 56 57 58 59 60 61; do
  echo "=== ISSUE #${number} ==="
  gh issue view "$number" --repo "$repo" --json number,title,url,body,comments \
    --jq '{
      number,
      title,
      url,
      body,
      comments: [.comments[] | {author: .author.login, body, url}]
    }'
done

Length of output: 11362


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"

comment() {
  local number="$1"
  local body="$2"
  gh issue comment "$number" --repo "$repo" --body "$body"
}

comment 50 "$(cat <<'EOF'
### Technical note

Keep two concepts separate: a toast is immediate feedback, while the bell is durable history. Mount one stable `aria-live=\"polite\"` region and insert only the success message into it. Do not move focus for a normal success toast. Avoid duplicate announcements by rendering each message once.

Reference: [MDN: ARIA live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Guides/Live_regions)
EOF
)"

comment 51 "$(cat <<'EOF'
### Technical note

Derive one named boolean, such as `canSubmit`, from the same validation state for both layouts. Do not let CSS breakpoints define different form semantics. Decide whether invalid forms are disabled or validated on submit, then apply that policy consistently.

Reference: [React: Sharing state between components](https://react.dev/learn/sharing-state-between-components)
EOF
)"

comment 52 "$(cat <<'EOF'
### Technical note

Use a ref for the opener because restoring focus needs a mutable value but does not need a render. Capture the element before focus moves into the dialog. On cleanup, call `.focus()` only when the saved element is still an `HTMLElement` and remains connected.

Reference: [React: Referencing values with refs](https://react.dev/learn/referencing-values-with-refs)
EOF
)"

comment 53 "$(cat <<'EOF'
### Technical note

Extract only the repeated structure. Keep field-specific state and option data in `TaskForm`, then pass explicit props for label, value, expanded state, and selection callback. Preserve unique button and panel IDs, `aria-expanded`, keyboard behavior, and focus handling.

Reference: [React: Passing props to a component](https://react.dev/learn/passing-props-to-a-component)
EOF
)"

comment 54 "$(cat <<'EOF'
### Technical note

Choose one source of truth for the search query. URL state should normally be canonical because navigation can change it externally. Keep local state only for a deliberate draft or debounce boundary. Test back, forward, direct links, clearing the query, and browser navigation.

Reference: [React: You might not need an Effect](https://react.dev/learn/you-might-not-need-an-effect)
EOF
)"

comment 55 "$(cat <<'EOF'
### Technical note

Do not poll the DOM after a mutation. Store the created task ID in React state and attach a callback ref to each card. When the card with that ID mounts, scroll that element and clear the pending ID. This ties the side effect to the rendered element and avoids orphaned timers.

Reference: [React: Manipulating the DOM with refs](https://react.dev/learn/manipulating-the-dom-with-refs)
EOF
)"

comment 56 "$(cat <<'EOF'
### Technical note

Treat motion documentation as a behavior contract. `scrollIntoView({ block: 'center' })` does not request smooth scrolling by itself. If the application promises reduced-motion support, implement an explicit `behavior` choice based on `prefers-reduced-motion`, then document both paths.

Reference: [MDN: `scrollIntoView()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
EOF
)"

comment 57 "$(cat <<'EOF'
### Technical note

Separate initial list rendering from newly created-card rendering. Track the created task ID and apply the entrance class only when a card ID matches it. Clear that marker after the animation if needed. Do not infer “new” from mount timing because filtering and refetching can mount many cards.

Reference: [MDN: CSS animations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animations/Using_CSS_animations)
EOF
)"

comment 58 "$(cat <<'EOF'
### Technical note

Search for each custom property across source files before deletion. A variable can be referenced through `var(--token)`, fallbacks, themes, or generated class names. Remove only proven-unused tokens in a small change, then review computed styles for affected states such as focus.

Reference: [MDN: Using CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties)
EOF
)"

comment 59 "$(cat <<'EOF'
### Technical note

Distinguish an upstream transport failure from an upstream GraphQL error response. Catch only a rejected `fetch` or timeout and map it to the documented `502` GraphQL-shaped response. If upstream returns a valid GraphQL `errors` payload, pass it through. Do not expose tokens, URLs, or raw internal error details.

Reference: [MDN: `fetch()` exceptions](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#exceptions)
EOF
)"

comment 60 "$(cat <<'EOF'
### Technical note

Extract the shared mutation lifecycle, not the task-specific inputs. The hook should accept the mutation document and explicit success/error messages. Preserve operation-specific variables and callbacks. Define the order of success effects, such as invalidate, notify, then close, and test that each caller keeps its current behavior.

Reference: [React: Reusing logic with custom Hooks](https://react.dev/learn/reusing-logic-with-custom-hooks)
EOF
)"

comment 61 "$(cat <<'EOF'
### Technical note

A fragment is a contract for one reusable selection set. Give it a domain name, such as `TaskFields`, and colocate it with the task GraphQL documents. Ensure the fragment type condition matches the returned task type. Regenerate or type-check generated client types after the change.

Reference: [GraphQL: Fragments](https://graphql.org/learn/queries/#fragments)
EOF
)"

Length of output: 6654


@Alejandroq12, I added a concise technical note and a reference link to each issue.

🐇✨

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"

for number in $(seq 50 61); do
  gh issue view "$number" --repo "$repo" \
    --json number,title,url,comments \
    --jq '"#\(.number) \(.title)\n\(.url)\nComments: \(.comments | length)\n---"'
done

Length of output: 437


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"

for number in {50..61}; do
  gh issue view "$number" --repo "$repo" \
    --json number,title,url,comments \
    --jq '"#\(.number) \(.title)\n\(.url)\nComments: \(.comments | length)\n---"'
done

Length of output: 1817


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="Alejandroq12/task-flow"

comment() {
  local number="$1"
  local body="$2"

  gh issue comment "$number" --repo "$repo" --body "$body"
}

comment 50 "$(cat <<'EOF'
### Engineering note

Treat transient feedback and notification history as separate UI responsibilities. Put `aria-live="polite"` on a stable, always-mounted toast container. Do not put focus on a success toast. Test that one successful mutation produces one visible announcement.

Read: [MDN: ARIA live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Guides/Live_regions)
EOF
)"

comment 51 "$(cat <<'EOF'
### Engineering note

Make one boolean represent the submit policy. Both responsive buttons must consume that same value. Keep the server-side validation because a disabled button is only a user-experience guard. Test the same invalid and valid form state at both breakpoints.

Read: [React: Controlling an input with state](https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)
EOF
)"

comment 52 "$(cat <<'EOF'
### Engineering note

Use `useRef` for a value that must persist between renders but must not trigger a render. Capture the opener before the dialog moves focus. On close, restore focus only if the stored element is still connected to the document.

Read: [React: `useRef`](https://react.dev/reference/react/useRef)
EOF
)"

comment 53 "$(cat <<'EOF'
### Engineering note

Extract shared structure only after you define a clear component contract. Pass each field label, current value, open state, toggle handler, and menu content as props. Keep field-specific state in `TaskForm`; the new component should not hide form behavior.

Read: [React: Passing props to a component](https://react.dev/learn/passing-props-to-a-component)
EOF
)"

comment 54 "$(cat <<'EOF'
### Engineering note

Avoid copying URL state into local state unless the input needs an independent editing phase. A controlled value derived from the URL is simpler when it meets the interaction requirements. If local state remains necessary, define one explicit synchronization boundary and test browser navigation.

Read: [React: You might not need an Effect](https://react.dev/learn/you-might-not-need-an-effect)
EOF
)"

comment 55 "$(cat <<'EOF'
### Engineering note

Let React identify the created task, then attach a ref to that task card and scroll from the ref after it mounts. Do not query or poll the document for React-owned nodes. If an asynchronous callback remains, clean it up during unmount.

Read: [React: Manipulating the DOM with refs](https://react.dev/learn/manipulating-the-dom-with-refs)
EOF
)"

comment 56 "$(cat <<'EOF'
### Engineering note

Document observable behavior, not intended behavior. `scrollIntoView({ block: "center" })` controls alignment but does not request smooth scrolling. If reduced-motion behavior is a requirement, implement an explicit `behavior` value and verify both preference paths.

Read: [MDN: `Element.scrollIntoView()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
EOF
)"

comment 57 "$(cat <<'EOF'
### Engineering note

Define the animation trigger in terms of stable task identity. Initial list mount and insertion of one new task are different events. Test a first page load, a filtered-list change, and a create mutation so the README describes all three cases correctly.

Read: [React: Rendering lists and keys](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key)
EOF
)"

comment 58 "$(cat <<'EOF'
### Engineering note

Confirm a CSS custom property is unused with a repository-wide search before deletion. Check direct `var(--token)` references and fallback values. Remove only dead tokens so the stylesheet remains a reliable source of design tokens.

Read: [MDN: Using CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties)
EOF
)"

comment 59 "$(cat <<'EOF'
### Engineering note

Separate transport failure from an upstream GraphQL error response. `fetch()` rejects for network failures, but an HTTP error response still resolves. Convert only thrown transport failures to the documented 502 GraphQL error shape, and preserve valid upstream error payloads.

Read: [MDN: Using the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
EOF
)"

comment 60 "$(cat <<'EOF'
### Engineering note

Extract the repeated workflow only when its inputs and outputs are explicit. The hook should own mutation completion effects, while each dialog keeps its mutation-specific variables and UI. Keep error behavior and success-message differences configurable, then test all three callers.

Read: [React: Reusing logic with custom Hooks](https://react.dev/learn/reusing-logic-with-custom-hooks)
EOF
)"

comment 61 "$(cat <<'EOF'
### Engineering note

Use a fragment for a stable response shape that multiple operations require. Give it a domain-specific name and keep it close to the task GraphQL documents. Confirm generated types and both mutation responses still contain the required fields after extraction.

Read: [GraphQL: Fragments](https://graphql.org/learn/queries/#fragments)
EOF
)"

Length of output: 6300


@Alejandroq12, I added a concise technical note and a learning resource to each issue: #50 through #61.

The notes focus on implementation judgment, verification, accessibility, React patterns, GraphQL behavior, and CSS maintenance.

ᕱ⑅ᕱ

You are interacting with an AI system.

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