feat(frontend): renew duty create/edit/assign flows (#436 #437)#499
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workspace.newinitial-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.hasAuthority(address)view; moved "作成" next to the 当番 page title on both mobile and desktop. Also hidden on the desktopDutyDetailPreview.hatsApolloClientnow switches to the Graph Gateway URL on Base, mirroringhatsSubgraphClientinuseHats.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.mintHatno longer swallows errors via an internaltry/catch; viem's revert / user-rejection errors bubble up so the route can render a toast.line-clamp-3) instead of single-line truncate.Test plan
/workspaceshows the joined / assisted / thanked workspaces (previously empty)当番page renders "作成" next to the title only when the wallet has HatCreator authorityroles/newflow: image upload, fallback colour+icon when nothing uploaded, chip-based responsibilities / authorities, submit lands on the new duty detail page with the metadata indexedhatId/editflow: existing image + fields hydrate, save updates the duty, page opens scrolled to the tophatId/assignflow: Namestone suggestion list, picked row collapses the dropdown, raw 0x addresses work, on success the duty detail page already shows the new wearer🤖 Generated with Claude Code