Skip to content

Hero demo: backspace the example out and rest on the hint - #125

Merged
sgardoll merged 1 commit into
mainfrom
feat/hero-demo-erases-to-hint
Oct 11, 2026
Merged

sgardoll merged 1 commit into
mainfrom
feat/hero-demo-erases-to-hint

Conversation

@sgardoll

@sgardoll sgardoll commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

What changes on the home page

Before: the hero demo typed A circular progress gauge with a gradient stroke, then streamed a grey autocomplete (and an animated percentage label) after it. The example then stayed in the field as a draft you could submit.

After:

  1. The composer holds for 5.2s with the blinking orange caret (unchanged).
  2. It types the example at 73ms per character (unchanged).
  3. No autocomplete. The full example rests for 1.6s with the orange caret.
  4. It backspaces the example out at 35ms per character, roughly the pace of a held Backspace key.
  5. The caret retires and the empty field shows only the light grey hint: Describe the widget or action you need.

Frames from a real Chromium capture of the erase phase: the full prompt with the caret, then …gradient stro, …with a gra, A circul, A ci, and finally the grey hint.

Scope

  • Only the demo's autocomplete is removed. Autocomplete while the user types (the 13 local patterns, Tab to accept, Esc to dismiss) is unchanged and still covered by its specs.
  • The example is now only an illustration, never a draft. So every way the demo can end lands the same empty field on its hint:
    • the demo finishes on its own
    • the user clicks, focuses, presses a key, or inputs into the field
    • the user leaves Home, or the tab is hidden
    • reduced motion is switched on mid-demo
  • That made the demo-owned and frozen state (heroDemoOwned / heroDemoFrozen) unnecessary, so it is deleted. That state existed only to stop the example being submitted, or the user's text joining it. composerAdapter.js: −131 / +63.
  • The <textarea> now ships empty, and the example moves to data-demo-prompt. Reduced-motion visitors and deep links therefore also land on the hint instead of a pre-filled prompt.
  • The is-demo-streaming caret CSS was only used by the removed suggestion stream, so it is deleted.
  • dist/ is rebuilt. A clean build of main matched the committed dist, so the asset diff here comes only from this change.

Behaviour change to be aware of

Generate is now disabled on first load because the field is empty. Before, the pre-filled example made Generate one click away. The example chips still fill a prompt in one tap.

Tests

  • npm test: 423/423 pass
  • npx playwright test (full suite): 268 passed, 0 failed
  • STU-445 hero specs are rewritten for the new end state:
    • The full-sequence spec samples the field from navigation. It asserts:
      • strictly growing prefixes up to the full example
      • then strictly shrinking prefixes (real backspacing, not a one-step clear)
      • the caret-blink animation is running at the peak
      • has-suggest never appears
      • the final state: empty field, hint placeholder, Generate disabled, caret retired
    • New spec: a click during the erase lands the empty field.
  • Several stu377 specs and one stu385 spec clicked Generate without typing a prompt. They had been relying on the old pre-filled example, and on silently waiting about 10s for the demo to finish. They now fill a prompt first.
  • Mutation checks (run locally, then reverted):
    • Replacing the backspace with a one-step clear fails the full-sequence spec (Expected > 2, Received 1).
    • Taking over without clearing the field fails all 6 takeover specs.

Devin Review

The hero demo used to type the example prompt, stream a ghost
autocomplete after it, and leave the example in the field as a ready
draft. Now it types the example behind the orange caret, rests 1.6s,
backspaces it out at a held-key pace (35ms/char), and leaves the empty
field on its grey hint. The demo no longer shows a suggestion.
Autocomplete while the user types is unchanged.

The example is now only an illustration, so every way the demo ends
(it finishes, a click/focus/keypress/input, leaving Home, the tab
hiding, a reduced-motion flip) lands the same empty field. That removes
the demo-owned/frozen state that existed to stop the example joining or
being submitted as the user's prompt.

The textarea ships empty; the example moves to data-demo-prompt, so
reduced motion and deep links also rest on the hint.

Tests: STU-445 hero specs rewritten for the new end state, plus a new
mid-erase takeover spec. Pipeline/settings specs that clicked Generate
on the old pre-filled prompt now fill one first.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@sgardoll
sgardoll merged commit b642210 into main Oct 11, 2026
7 checks passed
sgardoll added a commit that referenced this pull request Oct 11, 2026
…d while keys land"

This reverts commit b6ab54b.

It was pushed straight to main by mistake (the working tree had moved to
main after #125 merged). The same change re-lands through a PR for review.
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