Skip to content

Predict invitation after a run, 2D-first home hero, and docs for C++/Java input - #38

Merged
salsadsid merged 4 commits into
mainfrom
feat/phase-5-quick-wins
Oct 20, 2026
Merged

salsadsid merged 4 commits into
mainfrom
feat/phase-5-quick-wins

Conversation

@salsadsid

Copy link
Copy Markdown
Owner

What changed

Four small fixes that came out of the October analytics review:

  • Predict invitation after a watched run. On the sorting pages and the 1D linear search, the end-of-run nudge now
    reads "Got it? Predict the next run". The button switches to predict mode at the first step and moves focus to
    Play. predict_start reports from: "nudge", so this entry point can be compared with the Watch | Predict toggle.
    Tools without questions (grid, matrix, traversals, the other 1D operations) keep the old nudge.
    Why: in the last 28 days, 2 visitors started predict mode and nobody finished a round, while 36 watched a run to
    the end.
  • 2D-first home hero. The primary button now opens the 2D Array Visualizer and sorting becomes the secondary
    button. The buttons sit above the Popular links, so the primary one fits the first screen of a 360 × 640 phone. Spiral
    Traversal replaces the now-duplicate 2D pill. The title, H1 and description are unchanged.
    Why: the home page carries the most traffic and had the highest bounce rate on the site (33%, against 17.5% on the
    2D page).
  • Arrays FAQ. C++ and Java brace initializers paste as they are since fix(arrays): accept C++ brace matrices #33, so the FAQ no longer says to swap them
    for square brackets.
  • README and CONTRIBUTING. They list C++/Java brace input and Java code on the sorting pages (feat(sorting): add Java sorting snippets #36). CONTRIBUTING
    now says a new sort needs a Java version, because the sorting test checks every language.

The sitemap dates for / and /data-structures/arrays move to 2026-10-20.

How I checked it

  • npm run lint
  • npm test (115 passing)
  • npm run build
  • Looked at it on a phone-width screen (320–390 px) in light and dark mode
  • New or changed explanations follow the writing notes in CONTRIBUTING.md

On a local production build, with headless Chrome:

  • Predict mode: all 112 checks pass, including the new ones for the nudge. The button appears on bubble sort and
    1D search and is absent on 1D insert, spiral, flood fill and rotate. Clicking it starts predict mode at step 1 with
    focus on Play, and Space then holds at the first question. Dismissing still hides the nudge for the session.
  • Home hero: the primary button sits inside 360 × 640 and sends tool_open {tool: "arrays", from: "home_hero"}.
    The title and H1 are unchanged.
  • Layout and SEO: the SEO check passes on 27/27 pages, there's no sideways scrolling at 320–414 px (0 of 108 page
    × width combinations), and no cards overlap.

Screenshots or recording

r1-dark-360-bubble-nudge r1-light-360-home r1-light-1280-bubble-nudge

After merging

Compare the home bounce rate and predict_start by from in GA4 about two weeks after the deploy.

Predict mode had two starts and no finished rounds in four weeks,
while 36 visitors watched a run to the end. On pages with questions
the run-complete nudge now offers "Predict the next run", which
switches to predict mode at the first step and moves focus to Play.
predict_start reports from "nudge" so the two entry points can be
compared.
The home page ranks for "2d array visualizer" and carries the most
traffic, but its primary button opened sorting and it had the highest
bounce rate on the site (33%, against 17.5% on the 2D page). The
primary button now opens the 2D Array Visualizer and sorting becomes
the secondary one. The buttons move above the popular links so the
primary one fits the first screen of a 360 x 640 phone, and the
duplicate 2D pill gives way to Spiral Traversal, the grid-family page
with the most search impressions. The title, H1 and description stay
as they are until the arrays page takes over the query.
The input box reads C++ and Java brace initializers since #33, but
the FAQ still told people to replace the braces with square brackets
first. It now says to paste them as they are.
The README still listed the old input formats and four languages, and
CONTRIBUTING did not mention that a new sort now needs a Java version
for the sorting test to pass.
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
visualizer Ready Ready Preview Oct 20, 2026 9:59am UTC

@salsadsid
salsadsid merged commit 22fae73 into main Oct 20, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — da60b384 Deployed Oct 20, 2026 by vercel[bot]
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