Skip to content

Update to dApp and ecosystem-as-a-playground repo architecture - #4

Open
ritorhymes wants to merge 177 commits into
old-sitefrom
main-update
Open

Update to dApp and ecosystem-as-a-playground repo architecture#4
ritorhymes wants to merge 177 commits into
old-sitefrom
main-update

Conversation

@ritorhymes

Copy link
Copy Markdown
Contributor

No description provided.

Move wagmi/Web3Modal setup into shared foundation with lazy loading and cached clients

Make header connect button use shared loader, always open modal, and eager-load when a prior session exists (optional opt-in/out hook)

Refactor buy/personalize pages to reuse ensureConnected helper for tx flows, removing duplicate wagmi setup
Add shared mainnet guard to lazy Web3 foundation exposing wagmi switchNetwork with alert fallback when switching fails

Wire mainnet guard into buy/personalize transaction flows so they only proceed after connect plus mainnet check
Homepage main image tooltip now overflows instead of being hidden around edges

Homepage image squares become deselected when cursor leaves the image

Homepage recent squares activity components reformatted to prevent overflow and stack vertically on mobile and horizontally on desktop

personalize-batch now uses same CSS as personalize page for consistency
Move images into dedicated image folder

Move modal folders into master modal folder

Refactor main.css into more maintainable dedicated page-specific ones, and move into CSS folder

Adjust font and space sizing for greater consistency

Establish CSS variables and replaced hard coded values

Make custom stylized scroll bar universal

All imports updated for moved assets

Turn white paper article list into unordered list with reduced gap

Add additional break point for home page newly-minted newly-personalized to stack on smaller screens

Add FAQ link to main menu modal
Renamed modal.css to nav.css to better reflect content

Added semantic <nav> elements with aria-label attributes for screen readers

Converted articles link to <button> with aria-controls for proper semantics

Added aria-controls to back button

Added aria-label to Connect Wallet button
Refactored square lookup into a reusable component used on homepage and square.html

Added validation logic to square lookup form field (1–10,000 and minted-only alert)

Adjusted square lookup layout

Implemented mobile responsive grid structure for chooser buttons

Integrated square choosers into buy.html flow configured for unminted Squares
@ritorhymes

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02eba1ae13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread square.html Outdated
Comment on lines +217 to +221
const hrefRaw = personalization[1];
const normalizedHref = window.suNormalizeHref ? window.suNormalizeHref(hrefRaw) : hrefRaw;
elLink.innerHTML = normalizedHref
? `<a id="square-out-link" href="${normalizedHref}" target="_blank" rel="noopener">${hrefRaw}</a>`
: hrefRaw;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Render personalization link as text, not raw HTML

When a square personalization includes a link string, the code injects it via innerHTML, using the raw hrefRaw as HTML content. If the on-chain personalization data includes markup (e.g., <img onerror=...>), it will be parsed and executed in the page context. This is a new XSS vector introduced by making the link clickable. Use textContent for the anchor label (or set elLink.textContent when no safe URL is available) to ensure user-supplied link text can't inject HTML.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex do you have any other comments for your review of the 176 commits provided in this PR?

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02eba1ae13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread square.html Outdated
Comment on lines +217 to +221
const hrefRaw = personalization[1];
const normalizedHref = window.suNormalizeHref ? window.suNormalizeHref(hrefRaw) : hrefRaw;
elLink.innerHTML = normalizedHref
? `<a id="square-out-link" href="${normalizedHref}" target="_blank" rel="noopener">${hrefRaw}</a>`
: hrefRaw;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid injecting untrusted personalization HTML

When suNormalizeHref rejects a personalization URL (e.g., javascript: or data:), it returns an empty string (see assets/js/link-utils.js tests/implementation). In that case this branch falls back to elLink.innerHTML = hrefRaw, which renders whatever on-chain text was stored as raw HTML. If a user personalizes a square with <img onerror=…> or similar, the page will execute it. This is a regression from the previous innerText behavior and allows XSS whenever a personalization link is invalid/blocked by the normalizer. Consider using textContent/innerText in the fallback path or explicitly escaping the raw string.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex anything else? is this the only file u have a critique for?

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02eba1ae13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread square.html Outdated
Comment on lines +218 to +221
const normalizedHref = window.suNormalizeHref ? window.suNormalizeHref(hrefRaw) : hrefRaw;
elLink.innerHTML = normalizedHref
? `<a id="square-out-link" href="${normalizedHref}" target="_blank" rel="noopener">${hrefRaw}</a>`
: hrefRaw;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Escape personalization link text to avoid XSS

The personalization link text is interpolated into innerHTML using the raw value from squarePersonalizations.json. If a minted square’s href contains HTML (e.g., user-provided data in the personalization flow), this will be rendered as markup and can execute scripts, whereas the previous version used innerText. This makes XSS possible whenever a personalization record includes HTML/JS payloads.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex anything else in a different file or system?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@ritorhymes

Copy link
Copy Markdown
Contributor Author

@codex what security issues do you see?

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ritorhymes

Copy link
Copy Markdown
Contributor Author

@codex this was a huge PR, so you're saying that you think this is very well crafted without significant issues beyond what you pointed out here?

@ritorhymes

Copy link
Copy Markdown
Contributor Author

@codex did you only review square.html or did u look at other files?

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02eba1ae13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread _includes/nav-header.html
Comment on lines +98 to +102
<a
class="su-nav-btn"
data-nav-path="{{ site.baseurl }}/square"
href="{{ site.baseurl }}/square"
data-testid="nav-square-lookup"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Point square lookup link at an actual page URL

This nav link points to {{ site.baseurl }}/square, but the page in this repo is square.html without a permalink front‑matter or a global pretty‑URL setting in _config.yml. On GitHub Pages’ default Jekyll output, /square is a 404 (and now auto‑redirects to / via the new 404.html), so users can’t reach the Square lookup page. Either add a permalink to square.html (e.g. /square) or update links to /square.html.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if what ur saying is true, then how come it works properly always and goes to the correct destination via the nav bar link?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codex i asked u a question

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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