Skip to content

fix: bugs in dao creation flow#959

Merged
dan13ram merged 8 commits into
stagingfrom
fix/misc-fixes
Jun 2, 2026
Merged

fix: bugs in dao creation flow#959
dan13ram merged 8 commits into
stagingfrom
fix/misc-fixes

Conversation

@dan13ram
Copy link
Copy Markdown
Collaborator

@dan13ram dan13ram commented Jun 2, 2026

Summary by CodeRabbit

  • New Features

    • Artwork reset flow with confirmation modal and optional reset button; ConfirmReset supports customizable heading/helper/confirm label.
  • Improvements

    • Full-width image placeholders across feed for smoother loading visuals.
    • Button behavior tightened to suppress clicks when disabled and updated disabled visuals.
    • Form navigation spacing and mobile submit handling refined.
    • Minor layout polish (DAO create button width, review section border radius) and modal/button style tweaks.
    • Theme color tokens and mode handling updated for disabled/ghost states.
  • Bug Fixes

    • Founder-allocation toggle state synchronized with form state.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

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

Project Deployment Actions Updated (UTC)
testnet-nouns-builder Ready Ready Preview Jun 2, 2026 7:41am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nouns-builder Ignored Ignored Jun 2, 2026 7:41am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 29f167bd-cc67-4d4c-aa46-5d904757319a

📥 Commits

Reviewing files that changed from the base of the PR and between ecfacd1 and ee5e1cc.

📒 Files selected for processing (4)
  • packages/feed-ui/src/ZoraCoinCreatedItem.tsx
  • packages/feed-ui/src/ZoraDropCreatedItem.tsx
  • packages/ui/src/Artwork/ArtworkUpload.tsx
  • packages/zord/src/elements/Button.tsx

📝 Walkthrough

Walkthrough

Syncs allocation toggle state and mobile form submission, adds an artwork reset confirmation modal that clears Formik and store state, standardizes feed image skeletons via a fullWidth prop, and updates button disabled handling and theme/color-token behavior.

Changes

Form State & Navigation Refactoring

Layer / File(s) Summary
Founder allocation toggle state synchronization
packages/create-dao-ui/src/components/AllocationForm/AllocationForm.tsx
AllocationForm adds useEffect to sync hasFounderAllocation with hasExistingAllocation, and refactors the toggle handler into an in-render function that updates both local state and Formik founderAllocation values.
Form navigation layout and mobile submission
packages/create-dao-ui/src/components/FormNavButtons/FormNavButtons.tsx, packages/create-dao-ui/src/components/FormNavButtons/FormNavButtons.css.ts
Removes formNavResetButton CSS hook, adds gap={'x2'} to button containers, updates formNavContinueButton styles, and implements handleMobileContinue to submit via requestSubmit() when isSubmit is true.
CreateActions and ReviewSection styling
apps/web/src/modules/dashboard/CreateActions.tsx, packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.tsx, packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts
Simplifies CreateActions button inline style to width-only and applies curved borderRadius to an inner ReviewSection Flex while removing borderRadius from the CSS subheading.

Artwork Reset Feature

Layer / File(s) Summary
ConfirmReset component customization
packages/create-dao-ui/src/components/ConfirmReset/ConfirmReset.tsx
ConfirmReset expands props with optional heading, helperText, and confirmLabel and uses destructuring defaults instead of hardcoded text.
ArtworkUpload reset modal integration (create-dao-ui)
packages/create-dao-ui/src/components/Artwork/ArtworkUpload.tsx
Adds AnimatedModal + ConfirmReset, resetModalOpen state, handleResetArtwork to clear Formik and multiple store fields, renders the confirmation modal, and wires UploadComponent.onReset to open it.
ArtworkUpload UI reset button and error handling (ui)
packages/ui/src/Artwork/ArtworkUpload.tsx
Adds optional onReset prop and Button import, refactors post-upload UI to display errors or success summary, conditionally shows "Reset artwork" button when onReset is provided and data exists, and gates layerOrdering on no errors plus fileCount and traitCount.

Feed Image Skeleton Standardization

Layer / File(s) Summary
ImageSkeleton fullWidth prop
packages/feed-ui/src/FeedSkeleton.tsx
ImageSkeleton now accepts fullWidth?: boolean and applies width: '100%' and flexShrink: 0 when true.
Feed items using fullWidth skeleton
packages/feed-ui/src/AuctionBidPlacedItem.tsx, packages/feed-ui/src/AuctionCreatedItem.tsx, packages/feed-ui/src/AuctionSettledItem.tsx, packages/feed-ui/src/ClankerTokenCreatedItem.tsx, packages/feed-ui/src/ZoraCoinCreatedItem.tsx, packages/feed-ui/src/ZoraDropCreatedItem.tsx
Feed components update FallbackImage loadingPlaceholder to use <ImageSkeleton fullWidth /> for consistent placeholder sizing.

Design System Button & Theme Enhancements

Layer / File(s) Summary
Button disabled state click handling
packages/zord/src/elements/Button.tsx
Destructures onClick and memoizes handleClick that prevents default/stopPropagation when disabled, and the root element uses onClick={handleClick}.
Button CSS disabled state styling
packages/zord/src/elements/Button.css.ts
baseButton removed pointerEvents: 'none' in disabled selector; buttonVariants.ghost disabled styling now uses transparent background, onGhostDisabled border color, and opacity: 0.56.
Theme mode configuration & disabled color tokens
packages/zord/src/theme.css.ts, packages/zord/src/tokens/color.ts, packages/zord/src/utils/color-theme.ts
theme.css passes explicit mode to colorTheme for light/dark; color-theme.ts adds mode parameter and computes mode-aware neutralDisabled and onNeutralDisabled tokens; color constants adjusted and ghost disabled blend factors updated.

Modal & Minter UI Updates

Layer / File(s) Summary
MinterManagementModal icon and styling
packages/dao-ui/src/components/MinterManagementModal/MinterManagementModal.tsx
Removes Icon import from zord, switches remove button to icon="cross" prop with adjusted inline styles, and extends Add button inline height styling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped through forms to keep states true,

Reset the art with one small view.
Skeletons stretch from edge to edge,
Buttons steady on the ledge.
Colors learned to shift and sing—hooray!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is entirely empty, missing all required sections from the template including description, motivation, code review notes, type of change, and checklist items. Add a comprehensive description following the template: describe the changes made, explain the motivation and context (link to any related issues), provide code review notes, select the type of change, and check off the verification items.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change—bug fixes in the DAO creation flow—matching the changeset which contains UI adjustments and logic updates across multiple components in the DAO creation system.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/misc-fixes

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/feed-ui/src/ZoraCoinCreatedItem.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/feed-ui/src/ZoraDropCreatedItem.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

packages/ui/src/Artwork/ArtworkUpload.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

  • 1 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/zord/src/elements/Button.tsx (1)

118-146: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

handleClick only suppresses onClick, not native element actions.

This gating works for the default <button> (native disabled blocks activation), but Button is polymorphic. Combined with the removal of pointerEvents: 'none' in Button.css.ts, a disabled Button as="a" href=... would still navigate on click since disabled is inert on an anchor and handleClick does not call preventDefault. See the root-cause comment on Button.css.ts.

🤖 Prompt for 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.

In `@packages/zord/src/elements/Button.tsx` around lines 118 - 146, The current
useMemo for handleClick only returns undefined when disabled, which doesn't stop
native element behavior for polymorphic elements (e.g., anchors); change
handleClick so that when disabled it returns an actual event handler that calls
event.preventDefault() and event.stopPropagation() (and does not call the
original onClick), and when not disabled returns the provided onClick; update
the handler signature to accept the MouseEvent used by the Button component so
this safe-no-op prevents navigation for Button elements rendered as anchors
while preserving normal behavior for real buttons.
packages/feed-ui/src/ZoraCoinCreatedItem.tsx (1)

44-47: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistent skeleton sizing during metadata loading.

Line 46 uses <ImageSkeleton /> without fullWidth, while Line 64 uses <ImageSkeleton fullWidth /> for the FallbackImage placeholder. This creates inconsistent placeholder sizing between the metadata loading phase (lines 42-47) and the image loading phase (lines 60-67). Users will see the skeleton change width between loading states.

🎨 Proposed fix for consistent sizing
         ) : (
           <Box className={feedItemImage}>
-            <ImageSkeleton />
+            <ImageSkeleton fullWidth />
           </Box>
         ) : shouldUseMediaPreview ? (
🤖 Prompt for 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.

In `@packages/feed-ui/src/ZoraCoinCreatedItem.tsx` around lines 44 - 47, The
skeleton used while metadata is loading is missing the fullWidth prop causing a
width jump between the metadata-loading state and the image-loading fallback;
update the ImageSkeleton instance inside the conditional that checks
shouldUseMediaPreview and displayImageUrl (the one wrapped by Box with className
feedItemImage in ZoraCoinCreatedItem) to pass fullWidth so it matches the later
<ImageSkeleton fullWidth /> used for the FallbackImage placeholder.
packages/feed-ui/src/ZoraDropCreatedItem.tsx (1)

44-47: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Inconsistent skeleton sizing during media type loading.

Line 46 uses <ImageSkeleton /> without fullWidth, while Line 64 uses <ImageSkeleton fullWidth /> for the FallbackImage placeholder. This creates inconsistent placeholder sizing between the media type loading phase and the image loading phase, similar to the issue in ZoraCoinCreatedItem.

🎨 Proposed fix for consistent sizing
         {isMediaTypeLoading ? (
           <Box className={feedItemImage}>
-            <ImageSkeleton />
+            <ImageSkeleton fullWidth />
           </Box>
         ) : shouldUseMediaPreview ? (
🤖 Prompt for 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.

In `@packages/feed-ui/src/ZoraDropCreatedItem.tsx` around lines 44 - 47, The
media-type loading skeleton is sized inconsistently because the
isMediaTypeLoading branch renders <ImageSkeleton /> without the fullWidth prop
while the FallbackImage uses <ImageSkeleton fullWidth />; update the
isMediaTypeLoading rendering to pass fullWidth to ImageSkeleton so both
placeholders use the same sizing (look for the isMediaTypeLoading conditional
and the ImageSkeleton component usage in ZoraDropCreatedItem.tsx).
🧹 Nitpick comments (1)
packages/zord/src/elements/Button.css.ts (1)

29-31: ⚡ Quick win

Avoid enabling default navigation for Button disabled when polymorphing to links

Button.css.ts’s disabled state only sets cursor: not-allowed (no pointer-events: none), and Button.tsx just drops the React onClick handler when disabled. For polymorphic renders like as="a" / as={Link} with href, the browser default action can still fire because disabled is inert on anchors and Flex/Box don’t add click suppression.

No Button usages with disabled were found in this repo combined with as="a"/as={Link} and href on the same element, but the behavior would be problematic if that combination is introduced. Consider guarding default behavior in handleClick (e.g., preventDefault when disabled and the underlying element supports native navigation) or restoring pointer-events: none for disabled non-button polymorphs.

🤖 Prompt for 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.

In `@packages/zord/src/elements/Button.css.ts` around lines 29 - 31, The disabled
styling only sets cursor and Button.tsx removes the React onClick but doesn't
prevent native navigation when the component is polymorphed to an anchor/link
with href; update the disabled handling so native navigation can't occur: either
add pointer-events: none for non-button polymorphs in Button.css.ts (the
'&[disabled]' rule) or modify the Button.tsx click handler (e.g., handleClick)
to call event.preventDefault() and return early when props.disabled and the
rendered element supports navigation (detect via the polymorphic "as" prop or
presence of href), ensuring anchors/Link components cannot navigate when
disabled.
🤖 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 `@packages/ui/src/Artwork/ArtworkUpload.tsx`:
- Line 126: The current conditional can render a stray "0" because fileCount is
number|string and when it's 0 the && expression short-circuits to 0; change the
guard to explicitly test for a positive count (e.g. replace fileCount &&
traitCount > 0 with Number(fileCount) > 0 && traitCount > 0 && layerOrdering or
Boolean(Number(fileCount)) && traitCount > 0 && layerOrdering) so artworkError,
uploadError, fileCount, traitCount and layerOrdering are still used but no
literal 0 is rendered.

---

Outside diff comments:
In `@packages/feed-ui/src/ZoraCoinCreatedItem.tsx`:
- Around line 44-47: The skeleton used while metadata is loading is missing the
fullWidth prop causing a width jump between the metadata-loading state and the
image-loading fallback; update the ImageSkeleton instance inside the conditional
that checks shouldUseMediaPreview and displayImageUrl (the one wrapped by Box
with className feedItemImage in ZoraCoinCreatedItem) to pass fullWidth so it
matches the later <ImageSkeleton fullWidth /> used for the FallbackImage
placeholder.

In `@packages/feed-ui/src/ZoraDropCreatedItem.tsx`:
- Around line 44-47: The media-type loading skeleton is sized inconsistently
because the isMediaTypeLoading branch renders <ImageSkeleton /> without the
fullWidth prop while the FallbackImage uses <ImageSkeleton fullWidth />; update
the isMediaTypeLoading rendering to pass fullWidth to ImageSkeleton so both
placeholders use the same sizing (look for the isMediaTypeLoading conditional
and the ImageSkeleton component usage in ZoraDropCreatedItem.tsx).

In `@packages/zord/src/elements/Button.tsx`:
- Around line 118-146: The current useMemo for handleClick only returns
undefined when disabled, which doesn't stop native element behavior for
polymorphic elements (e.g., anchors); change handleClick so that when disabled
it returns an actual event handler that calls event.preventDefault() and
event.stopPropagation() (and does not call the original onClick), and when not
disabled returns the provided onClick; update the handler signature to accept
the MouseEvent used by the Button component so this safe-no-op prevents
navigation for Button elements rendered as anchors while preserving normal
behavior for real buttons.

---

Nitpick comments:
In `@packages/zord/src/elements/Button.css.ts`:
- Around line 29-31: The disabled styling only sets cursor and Button.tsx
removes the React onClick but doesn't prevent native navigation when the
component is polymorphed to an anchor/link with href; update the disabled
handling so native navigation can't occur: either add pointer-events: none for
non-button polymorphs in Button.css.ts (the '&[disabled]' rule) or modify the
Button.tsx click handler (e.g., handleClick) to call event.preventDefault() and
return early when props.disabled and the rendered element supports navigation
(detect via the polymorphic "as" prop or presence of href), ensuring
anchors/Link components cannot navigate when disabled.
🪄 Autofix (Beta)

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

Run ID: 637fc58a-8c4b-4266-9413-12e6918bba52

📥 Commits

Reviewing files that changed from the base of the PR and between 92807d8 and ecfacd1.

📒 Files selected for processing (22)
  • apps/web/src/modules/dashboard/CreateActions.tsx
  • packages/create-dao-ui/src/components/AllocationForm/AllocationForm.tsx
  • packages/create-dao-ui/src/components/Artwork/ArtworkUpload.tsx
  • packages/create-dao-ui/src/components/ConfirmReset/ConfirmReset.tsx
  • packages/create-dao-ui/src/components/FormNavButtons/FormNavButtons.css.ts
  • packages/create-dao-ui/src/components/FormNavButtons/FormNavButtons.tsx
  • packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts
  • packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.tsx
  • packages/dao-ui/src/components/MinterManagementModal/MinterManagementModal.tsx
  • packages/feed-ui/src/AuctionBidPlacedItem.tsx
  • packages/feed-ui/src/AuctionCreatedItem.tsx
  • packages/feed-ui/src/AuctionSettledItem.tsx
  • packages/feed-ui/src/ClankerTokenCreatedItem.tsx
  • packages/feed-ui/src/FeedSkeleton.tsx
  • packages/feed-ui/src/ZoraCoinCreatedItem.tsx
  • packages/feed-ui/src/ZoraDropCreatedItem.tsx
  • packages/ui/src/Artwork/ArtworkUpload.tsx
  • packages/zord/src/elements/Button.css.ts
  • packages/zord/src/elements/Button.tsx
  • packages/zord/src/theme.css.ts
  • packages/zord/src/tokens/color.ts
  • packages/zord/src/utils/color-theme.ts
💤 Files with no reviewable changes (2)
  • packages/create-dao-ui/src/components/FormNavButtons/FormNavButtons.css.ts
  • packages/create-dao-ui/src/components/ReviewAndDeploy/ReviewSection.css.ts

Comment thread packages/ui/src/Artwork/ArtworkUpload.tsx Outdated
@dan13ram dan13ram merged commit aa9187d into staging Jun 2, 2026
2 of 4 checks passed
@dan13ram dan13ram deleted the fix/misc-fixes branch June 2, 2026 07:34
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