Skip to content

[#738] Writer tab v9: status/created to deadline, rating stat box#740

Merged
realproject7 merged 3 commits intomainfrom
task/738-writer-deadline-rating
Apr 2, 2026
Merged

[#738] Writer tab v9: status/created to deadline, rating stat box#740
realproject7 merged 3 commits intomainfrom
task/738-writer-deadline-rating

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Move active/complete tag from 2×2 stat boxes into the Deadline divider section (e.g., "active · Deadline: 1d 8h 31m")
  • Move Created date to Deadline section with full year formatting (e.g., "Created: Mar 26, 2026") — removed from stat boxes
  • Replace the now-empty 4th stat box with Rating (shows average like "4.5" or "—" if no ratings)
  • Added rating query per story card using existing /api/ratings endpoint

Fixes #738

Test plan

  • Writer tab: active/complete badge appears in the deadline divider row, not in stat boxes
  • Writer tab: Created date shows in deadline section with full year (e.g., "Mar 26, 2026")
  • Writer tab: 4th stat box shows Rating with average or "—"
  • Active stories: "active · Deadline: Xd Xh Xm" in one row
  • Complete stories: "complete" badge with Created date below, no deadline
  • Verify at 375px mobile viewport

🤖 Generated with Claude Code

…ting box

1. Move active/complete tag from stat boxes to Deadline divider section
2. Move Created date to Deadline section with full year (e.g. Mar 26, 2026)
3. Replace empty 4th stat box with Rating (average or "—")

Fixes #738

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 2, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 2, 2026 7:27am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

T2b APPROVE — all 3 items for #738 verified:

  1. Active/complete tag moved to deadline divider section with dot separator before countdown ✓
  2. Created date in deadline section with full year (year: 'numeric') ✓
  3. 4th stat box replaced with Rating (useQuery to /api/ratings, average.toFixed(1) or '—') ✓

Deadline section now always renders (status + Created visible for both active and complete stories) — good improvement over the previous conditional render. Rating query uses 60s staleTime, consistent with existing per-card query pattern. Single file, net +20 lines. Clean.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES

Summary

The deadline/status and created-date layout changes look aligned with issue #738, but the new rating box is implemented by adding a fresh client-side ratings fetch inside every StoryRow.

Findings

  • [medium] The rating stat now starts its own /api/ratings query per story card in StoryRow, even though the repo already has rating-fetching helpers/components and the ticket explicitly called for using existing ratings data. That turns the Writer tab into an N+1 request pattern for a layout-only change and adds duplicate ratings-fetch logic to the page.
    • File: src/app/profile/[address]/page.tsx:815
    • Suggestion: derive the average from the existing storyline/ratings data path, or reuse/extend the existing rating helper/component instead of adding a new per-card query.

Decision

Requesting changes because the layout requirements are mostly in place, but the rating box implementation introduces avoidable duplicate network work and does not follow the ticket’s existing-data requirement.

…etch

Addresses T2a review: replace per-card /api/ratings fetch with a single
supabase query in StoriesTab that batch-fetches all ratings for the
writer's storylines and passes them down as a prop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES

Summary

The N+1 ratings-fetch problem is fixed, but the new batch ratings query still misses the repo’s normal contract scoping.

Findings

  • [medium] The new batch ratings query reads from ratings by storyline_id only and does not filter by contract_address, unlike the existing /api/ratings route and other ratings reads. That can pull ratings from the wrong contract/factory into the Writer stat box if ids overlap, so the displayed average is no longer guaranteed to match the rest of the app.
    • File: src/app/profile/[address]/page.tsx:575
    • Suggestion: add the same contract_address = STORY_FACTORY.toLowerCase() filter used by the existing ratings code path.

Decision

Requesting changes because the batching approach is better, but the new query still needs the existing contract filter to keep rating averages correct.

Scopes the ratings query to STORY_FACTORY, matching the existing
ratings API pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: APPROVE

Summary

The follow-up fixes resolve my review findings. Ratings are now fetched once at the StoriesTab level, the batch query is scoped with the existing contract_address filter, and the Writer v9 layout changes match issue #738.

Findings

  • None.

Decision

Approving because the remaining review blockers are addressed and I do not see a code-level mismatch against the ticket.

@realproject7 realproject7 merged commit 5070523 into main Apr 2, 2026
5 checks passed
@realproject7 realproject7 deleted the task/738-writer-deadline-rating branch April 2, 2026 07:29
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.

Writer tab v9 — move active/created to deadline, add rating box

2 participants