Skip to content

Revamp UI, enhance documentation (+review fixes) - #54

Closed
smilewithkhushi wants to merge 35 commits into
HorizenOfficial:mainfrom
smilewithkhushi:main
Closed

smilewithkhushi wants to merge 35 commits into
HorizenOfficial:mainfrom
smilewithkhushi:main

Conversation

@smilewithkhushi

Copy link
Copy Markdown
Collaborator

No description provided.

smilewithkhushi and others added 30 commits July 21, 2026 17:58
Enhance Stork oracle and MCP Server documentation
- Implemented a new Newsletter component in index.tsx that handles user input for name and email.
- Added form submission logic to send subscription requests to a new API endpoint.
- Created a new API route (subscribe.ts) to handle subscription requests and interact with the Beehiiv API.
- Included error handling and loading states for better user experience.
- Updated package.json to include @vercel/node for serverless function support.
feat: add newsletter subscription functionality with API integration
- Added Tailwind CSS and PostCSS dependencies in package.json.
- Updated custom.css to include Tailwind's theme and utilities, and adjusted dark mode styles.
- Refactored index.module.css to improve layout and styling, including adjustments to hero and section components.
- Enhanced index.tsx with new building cards and improved layout for hero and sections.
- Redesigned the footer component to remove CSS module dependency and implement Tailwind styles.
- Updated Navbar styles for better visual consistency and responsiveness.
- Created a new Tailwind plugin for PostCSS integration.
- Implemented a new Newsletter component in index.tsx that handles user input for name and email.
- Added form submission logic to send subscription requests to a new API endpoint.
- Created a new API route (subscribe.ts) to handle subscription requests and interact with the Beehiiv API.
- Included error handling and loading states for better user experience.
- Updated package.json to include @vercel/node for serverless function support.
Rewrote and expanded Vela docs with new Developer Reference pages, fixed
terminology, removed Hello World references, and updated LLM index files.
Added newsletter Cloudflare function, migration section to llms-ctx, and
minor footer and landing page updates.
@ysibirski

Copy link
Copy Markdown

Thanks for the quick turnaround on the review fixes. Most of the original review is addressed, and I verified the docs by building the site locally:

  • MCP mainnet chain ID is now 26514, and the published horizen-mcp package returns the same value, so the "verify it's working" note is consistent.
  • Claude config paths split into Desktop (macOS), Desktop (Windows), and Claude Code.
  • "validator setup" example swapped for "bridging ZEN".
  • Client-side redirects added; both hello-world and limitations/limitations build and resolve correctly.
  • Committed public/llms.txt and public/llms-full.txt removed.
  • Request body is now guarded (try/catch to 400) with server-side email validation.
  • Turnstile frontend widget wired in, README variables section rewritten, .dev.vars.example updated.
  • @cloudflare/workers-types added. npm run typecheck at this head produces only the single pre-existing DocBreadcrumbs error already on main, so no new type errors. The separate functions/tsconfig.json is not needed after all.

A few items from the review are still open, and the fix commit introduced two things worth catching before merge.

Still open from the review

  1. (Must fix) public/llms-ctx.txt:49 still points the Vela roadmap at https://docs.horizen.io/vela/roadmap/roadmap, which 404s. The built route is /vela/roadmap (a local build emits build/vela/roadmap/index.html, no .../roadmap/roadmap/). Your new redirect already uses the correct /vela/roadmap, so it is just this line that is out of sync.
  2. functions/api/subscribe.ts still sends reactivate_existing: false. A previously-unsubscribed user gets a 2xx and the UI shows "You're subscribed!" while they stay inactive. Should be true.
  3. docusaurus.config.ts:72-73 still carries the llms-per-page must come AFTER ... comment. postBuild hooks run concurrently and llms-per-page never reads llms.txt, so the comment is misleading. Safe to drop.
  4. .gitignore still has the duplicate .vercel (lines 49 and 52) and the redundant .env*.local (line 53, already covered by the env block at lines 2-8).
  5. docs/vela/reference/*.md sidebar_position still collides: smart-contracts=1, trigger-contracts=1, typescript-client=2, wasm-development=2. Suggest 1 to 4 in that order.
  6. docs/vela/reference/typescript-client.md:24 still has the bare positional false with no note on what the flag controls.
  7. Name field is only half fixed. first_name was dropped from the payload (good, it is not a beehiiv field), but the Name input is still rendered and name is still sent in the POST body, then ignored by the function. So users type a name that goes nowhere. Either map it to custom_fields: [{ name: 'First Name', value }] (the custom field must exist on the publication) or remove the Name input.
  8. npm ownership. The docs still say npx -y horizen-mcp, and the package's only npm maintainer is still a personal account. A GitHub repo transfer does not move npm ownership, so the package itself still needs to be republished under an org account (or a scoped @horizen/mcp) with npm owner add before the docs send users to it.

Newly introduced by the fix commit

  1. functions/api/subscribe.ts is fail-open on Turnstile. TURNSTILE_SECRET_KEY is optional and falls back to Cloudflare's always-pass test secret (1x0000...AA), so if the Pages variable is ever missing, siteverify returns success for any token and bot protection is silently off with no error. Please require the secret (TURNSTILE_SECRET_KEY: string, no fallback) and keep the test key only in .dev.vars for local dev. Related: the post-merge smoke check should POST {"email":"probe@example.com"} with no turnstileToken and expect a 403. A bare {} returns 400 on email validation whether or not Turnstile is enforced, so it would not catch this.
  2. docs/vela/getting-started/first-confidential-app.md clone alternative has a wrong path. It runs cp vela-nova/wallet.conf.template ..., but in vela-nova (both main and v0.2.0) the file lives at wallet/wallet.conf.template. The "download three files from the release" path is correct; only the clone snippet needs wallet/.

Minor, pre-existing

  1. The README tells readers to put the build-time vars in a root .env, but Docusaurus does not load .env natively and there is no dotenv dependency, so those values are not picked up as written (locally it is masked by the Turnstile test-key fallback). Worth either adding dotenv or documenting inline/exported env vars.

Everything else from the review checks out. Thanks again.

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.

2 participants