Skip to content

feat: add interface for settle the next noun#1048

Open
nekofar wants to merge 25 commits intonounsDAO:masterfrom
nekofar:feature/add-interface-to-settle-the-next-noun
Open

feat: add interface for settle the next noun#1048
nekofar wants to merge 25 commits intonounsDAO:masterfrom
nekofar:feature/add-interface-to-settle-the-next-noun

Conversation

@nekofar
Copy link
Contributor

@nekofar nekofar commented May 23, 2025

It's related to #1045.

@github-project-automation github-project-automation bot moved this to Backlog in Nouns dev May 23, 2025
@volkyeth volkyeth linked an issue May 26, 2025 that may be closed by this pull request
@volkyeth
Copy link
Member

will most likely close #998

@nekofar
Copy link
Contributor Author

nekofar commented Jun 1, 2025

@volkyeth logic’s basically done and tested on Sepolia. holding off on UI tweaks until #1063 lands; any changes there might force a redesign 😅

@nekofar nekofar force-pushed the feature/add-interface-to-settle-the-next-noun branch 3 times, most recently from 7396691 to 0d8dba1 Compare June 11, 2025 12:45
@nekofar
Copy link
Contributor Author

nekofar commented Jun 11, 2025

@volkyeth Fixed a few minor things; page still looks kinda empty though. Any ideas?

@nekofar nekofar marked this pull request as ready for review June 11, 2025 14:35
@volkyeth
Copy link
Member

@nekofar it loads for a while, then it's blank for me
CleanShot 2025-06-11 at 15 52 20@2x

@netlify
Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for nouns-home failed.

Name Link
🔨 Latest commit 616f8f4
🔍 Latest deploy log https://app.netlify.com/projects/nouns-home/deploys/684b1b566bf83f0009fb85b9

@volkyeth
Copy link
Member

same problem on the deployment above

@nekofar
Copy link
Contributor Author

nekofar commented Jun 12, 2025

same problem on the deployment above

I think WebSocket URL is not configured properly on deployment. There are forbidden errors on WS endpoint on deployment.

@volkyeth
Copy link
Member

@nekofar

I think WebSocket URL is not configured properly on deployment. There are forbidden errors on WS endpoint on deployment.

Those forbidden errors were most likely caused bc we reached the usage limit on Alchemy. prod was down for a bit 💀
I've updated it to use an Ankr node for now, and it's connecting correctly

still, local env and preview deployment show a loading Noun, then a blank screen
CleanShot 2025-06-12 at 15 21 15

@volkyeth
Copy link
Member

npmjs registry down 😮...what a day

@nekofar nekofar force-pushed the feature/add-interface-to-settle-the-next-noun branch from 616f8f4 to 02dc4b2 Compare June 12, 2025 20:21
@volkyeth
Copy link
Member

CleanShot 2025-06-13 at 11 11 01@2x

maybe a countdown progress bar on top of the button instead of the seconds countdown

it's a bit too bland rn

@nekofar
Copy link
Contributor Author

nekofar commented Jun 14, 2025

CleanShot 2025-06-13 at 11 11 01@2x

maybe a countdown progress bar on top of the button instead of the seconds countdown

it's a bit too bland rn

I've added a progress bar as well. 🤔

@volkyeth
Copy link
Member

CleanShot 2025-06-16 at 09 28 19@2x
should probably replace the Settle button for an informational alert while the auction is not settled instead of including that disclaimer

@volkyeth
Copy link
Member

do you mind if I try my hand at adding some flair to it?

<Button className={classes.bidBtnAuctionEnded} onClick={fomoNounsBtnOnClickHandler}>
<Trans>Vote for the next Noun</Trans> ⌐◧-◧
<Button className={classes.bidBtnAuctionEnded} onClick={() => navigate('/oracle')}>
<Trans>Settle the next Noun</Trans> ⌐◧-◧
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Trans>Settle the next Noun</Trans> ⌐◧-
<Trans>Pick the next Noun</Trans> ⌐◧-

} = useWriteNounsAuctionHouseSettleCurrentAndCreateNewAuction();

useWatchBlocks({
syncConnectedChain: false,
Copy link
Member

Choose a reason for hiding this comment

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

should probably set this up globally on wagmi.ts
(I thought it was already 🤔 )

import { formatEther } from 'viem';
import { useWatchBlocks } from 'wagmi';

import Noun, { LoadingNoun } from '@/components/LegacyNoun';
Copy link
Member

Choose a reason for hiding this comment

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

Can you use the newer "@/components/Noun.tsx"
We should probably deprecate LegacyNoun in favor of it

};

const processNounData = (nounId: number, blockHash: string) => {
const nounSeed = getNounSeedFromBlockHash(nounId, blockHash);
Copy link
Member

Choose a reason for hiding this comment

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

if you use the newer @/components/Noun.tsx you can just provide it the seed and get rid of the logic below

try {
setCurrentBlockTimestamp(Number(block.timestamp));

const auctionData = await readNounsAuctionHouseAuction(config, {});
Copy link
Member

Choose a reason for hiding this comment

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

could update the auction separately, since this fetch seems to add ~1 second of delay when rendering the next Noun, and since settling is very time-sensitive

}, [didSettleFail, settleAuctionError?.message]);

const handleSettleAuction = useCallback(() => {
settleAuction({});
Copy link
Member

Choose a reason for hiding this comment

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

wondering if we should provide maxFeePerGas and maxPriorityFeePerGas to ensure it settles in the very next block instead of relying on the wallet for gas params, lest folks fumble it

@nekofar
Copy link
Contributor Author

nekofar commented Jun 18, 2025

I'll look into this on weekend. 👍

introduce `OraclePage` and register it under the "/oracle" route.
This provides a framework for implementing the Oracle feature.
nekofar added 24 commits July 8, 2025 01:57
replace external link with navigation to `/oracle` route. This aligns the flow with the new Oracle feature and improves user experience.
enhance navbar button state by including `/oracle` in `useStateBg`. This ensures consistent styles for the newly added Oracle route.
add auction state handling and display next noun preview for `/oracle`. This improves user experience by providing real-time auction updates and visual representation of the next noun.
separate auction state determination and next noun processing into reusable functions. This improves code readability, reduces duplication, and ensures better maintainability.
introduce auction settlement with an alert modal for failures. This improves usability by allowing users to settle auctions directly and see error notifications.
streamline conditional rendering for loading and auction states. This improves code readability and reduces unnecessary nesting.
introduce a ref to track the previous noun ID and optimize loading. This ensures updates only occur on noun ID changes, improving efficiency and clarity.
introduce block countdown feature with `BlockTimeCountdown` component and update noun ID increment logic. This enhances user experience by providing real-time block updates and ensuring accurate noun ID progression.
extract and simplify auction and noun processing logic into reusable functions and dedicated components. This improves readability, reduces redundancy, and enhances maintainability.
simplify error handling by replacing `AlertModal` with `toast.error`. This improves user experience with consistent and less intrusive notifications.
align with updated component structure by importing from `LegacyNoun`. This improves maintainability and reflects recent component changes.
simplify auction handling by removing manual settlement button. This reduces redundancy and aligns with the streamlined auction process.
simplify structure by relocating `Oracle` page. This improves organization and aligns with directory conventions.
simplify styling by switching to `className` syntax for consistency. This improves readability and aligns with modern React best practices.
switch to `container-xl` and `lg:flex-row` for improved alignment with modern screen sizes and design standards.
streamline auction state checks and conditional rendering logic. This improves code readability and ensures clearer auction status display.
replace conditional rendering with `Alert` component for consistent styling and improved readability. This aligns with reusable UI practices and modernizes the design.
streamline `Oracle` page text and layout for clarity. Updated styling makes the UI more cohesive and improves user experience.
reorganize text elements for better clarity and user readability. Updated layout ensures consistent styling and enhances user experience.
refine spacing and remove redundant class for cleaner layout. This improves visual consistency and enhances user experience.
improve spacing by replacing `lg` classes with `md` classes for better responsiveness. This enhances layout consistency across mid-sized screens.
add new progress component dependency for enhanced UI capabilities. This prepares for future functionality requiring progress indicators.
introduce new `Progress` component with Radix integration for consistent progress indicator styling. Enhances UI capabilities and prepares for future usage.
add `Progress` component to display block time countdown visually. Improves user feedback and enhances page aesthetics.
@nekofar nekofar force-pushed the feature/add-interface-to-settle-the-next-noun branch from 7de3748 to feff95b Compare July 7, 2025 23:02
@volkyeth
Copy link
Member

@nekofar what's the current state of this PR? should we try and wrap this up before #1260?
lmk if you want help

@nekofar
Copy link
Contributor Author

nekofar commented Aug 14, 2025

@nekofar what's the current state of this PR? should we try and wrap this up before #1260? lmk if you want help

It’s already broken, and this new PR is just lining up more breakage, so I’d rather tackle it after we move to Next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Add FOMO-like interface to settle the next Noun

2 participants