Skip to content

feat(frontend): renew duty create/edit/assign flows (#436 #437)#499

Merged
yu23ki14 merged 1 commit into
v3from
issue/436_437
May 12, 2026
Merged

feat(frontend): renew duty create/edit/assign flows (#436 #437)#499
yu23ki14 merged 1 commit into
v3from
issue/436_437

Conversation

@yu23ki14

Copy link
Copy Markdown
Member

Summary

  • Rebuild duty create / edit forms around the workspace.new initial-role layout (image upload + random colour/icon fallback, name, description, chip-based 責任 / 権限). Scroll resets to top on mount so navigating in from the duty list doesn't open the page mid-scroll.
  • Replace the duty assign route with a single-page form: Namestone-resolved suggestion list that collapses to the chosen row, datetime-local start, authority-gated submit. 3s post-mint pause so the Hats subgraph indexes the new wearer before navigating back to the detail page. Errors stay on-page and surface a short toast instead of silently routing away.
  • Gate 当番作成 (HatCreator) and 担当を追加 (TimeFrame) CTAs on each module's hasAuthority(address) view; moved "作成" next to the 当番 page title on both mobile and desktop. Also hidden on the desktop DutyDetailPreview.
  • Fix the Base workspace list: hatsApolloClient now switches to the Graph Gateway URL on Base, mirroring hatsSubgraphClient in useHats.ts. The Studio endpoint Hats Protocol used to publish for Base has been retired, which is why "参加中" was empty on Base while Sepolia was fine.
  • useMintHatFromTimeFrameModule.mintHat no longer swallows errors via an internal try/catch; viem's revert / user-rejection errors bubble up so the route can render a toast.
  • Activity-row messages on the workspace home now wrap up to 3 lines (line-clamp-3) instead of single-line truncate.
  • Duty-delete UI parked behind comments — no on-chain hat-deactivation primitive ships yet, so the button + sheet + handler are commented out together for easy restoration once the toggle work lands.

Test plan

  • On Base, /workspace shows the joined / assisted / thanked workspaces (previously empty)
  • 当番 page renders "作成" next to the title only when the wallet has HatCreator authority
  • Duty detail "担当を追加" + desktop preview "担当を追加" only appear when the wallet has TimeFrame authority
  • roles/new flow: image upload, fallback colour+icon when nothing uploaded, chip-based responsibilities / authorities, submit lands on the new duty detail page with the metadata indexed
  • hatId/edit flow: existing image + fields hydrate, save updates the duty, page opens scrolled to the top
  • hatId/assign flow: Namestone suggestion list, picked row collapses the dropdown, raw 0x addresses work, on success the duty detail page already shows the new wearer
  • Reject / revert during assign: stays on the form with "エラーが起きました。" toast (no navigation)
  • Activity rows on workspace home wrap long messages to ≤3 lines

🤖 Generated with Claude Code

- Rebuild duty create/edit forms around the workspace.new initial-role
  pattern (image upload + name + description + chip-based responsibilities
  / authorities). Random colour + icon fallback when no image is uploaded.
- Replace the duty-assign route with a single-page form: Namestone-resolved
  suggestion list that collapses to the chosen row, datetime-local start,
  authority-gated submit. 3s post-mint pause so the Hats subgraph indexes
  the new wearer before navigating back to the detail page.
- Gate "当番作成" / "担当を追加" CTAs on the module hasAuthority view
  (HatCreator + TimeFrame); move "作成" next to the page title.
- Switch `hatsApolloClient` to the Graph Gateway URL on Base so workspaces
  resolve there (mirrors `hatsSubgraphClient` in useHats.ts); the Studio
  endpoint Hats Protocol used to publish for Base has been retired.
- Rethrow `useMintHatFromTimeFrameModule.mintHat` errors so the assign
  route can show a toast instead of silently navigating away.
- Allow activity-row messages to wrap up to 3 lines (line-clamp-3).
- Park duty-delete UI (commented out) until on-chain deactivation is wired.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yu23ki14 yu23ki14 changed the base branch from main to v3 May 12, 2026 14:14
@yu23ki14 yu23ki14 merged commit faf6726 into v3 May 12, 2026
1 of 2 checks passed
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