Skip to content

fix(companies): a refused company handle says why, beside the field - #553

Merged
allisonmahmood merged 2 commits into
mainfrom
fix/552-join-handle-warnings
Oct 6, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
fix/552-join-handle-warnings

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

A new user typed a capitalized company handle, clicked Create company, and nothing happened. The handle input's HTML pattern let the browser block the submit with a generic "Match the requested format" bubble, which Safari hides after a moment, so the request never reached Patchy. Server refusals (taken, reserved) landed in a note above Company name, away from the field at fault.

Now Patchy names every refusal beside the field, and the handle shows the address it becomes:

  • The address is in the field. The handle sits after a fixed prefix of the instance's host (cloud.patchyhq.com/), so the lowercase rule explains itself. Only the handle is editable; the prefix is a second label, so clicking it focuses the input.
  • A small warning while typing. The hint and border turn red while the value breaks the field's own constraints. CSS only (:invalid), so the page stays a plain form with no script.
  • A clear one on submit. The form is novalidate. A refused create replaces the hint with a callout under the field at fault, naming the broken rule and, when that handle is free, the fix ("Handles are lowercase. Try acme."), with aria-invalid, aria-describedby and autofocus on the field. Taken, reserved, case, characters, length and end hyphens each get their own message. The company name gets the same callout, since a blank name no longer stops at the browser.
  • The hint stops promising a pre-fill it can't keep. "Pre-filled from the company name" was only true on first load.

Handles stay lowercase-only; capitals are refused visibly rather than converted.

The shell gains field-group/field-prefix, field-rule and field-callout, recorded in the ui-consistency spec. A long instance host wraps inside the field instead of squeezing the input. Companies gains isHandleTaken, so a suggestion is never a handle another company holds; create still settles a race through its unique insert. The join test now asserts each refusal's callout, its ARIA wiring and that the entered handle is kept (the old test's title claimed that without checking it).

Hit every surface:

  • Served pages. Applied: new shell components, spec updated.
  • Vocabulary. Unchanged: the label stays "Company handle"; the prefix shows the address it opens, as the glossary puts it.
  • Not applicable: the wire contract, the CLI, the dev loop, migrations, company resources, reverse states and the repo layout.

Out of scope: the connection-handle field on Connections has the same native-bubble problem.

Closes #552

Made by Claude Opus 5.5 via Claude Code in T3 Code.

The handle input's HTML pattern let the browser block Create company with a
generic bubble, so a capitalized handle looked like a broken button. Server
refusals landed in a note above Company name, away from the field at fault.

The form is now novalidate and Patchy names every refusal in a callout under
the field at fault, with a fix where one exists. The handle shows the address
it opens as a fixed prefix, and its hint turns red while the value breaks the
rule, in CSS only. The shell gains field-group, field-prefix, field-rule and
field-callout.

Closes #552

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:core Touches the core area area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:m 100-500 changed lines labels Oct 6, 2026
… host wrap

A refused handle offered its lowercase form even when another company held
it, so following the suggestion hit "taken". Companies gains isHandleTaken
and the suggestion is checked first. A long instance host could squeeze the
handle input to nothing; the prefix now wraps and the input keeps 8ch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Codex review (GPT 6.1 Sol)

Round 1 verdict: one merge blocker, one minor. Both are fixed in b4c7f26.

  1. Major, fixed. A suggestion could be a taken handle (Join.ts). Submitting PATCHY-DEV offered "Try patchy-dev", which the seed already holds, so following it hit 409. The guard checked syntax and the reserved list but not availability. Companies gains isHandleTaken, and handleRefusal offers a fix only when it is free; create still settles a race through its unique insert. The suggestion test now covers a free and a taken suggestion.
  2. Minor, fixed. A long instance host could squeeze the handle input to nothing (html.ts). The prefix was flex: none. It now shrinks and wraps (overflow-wrap: anywhere), and the input keeps min-width: 8ch. Checked at 360 px with a 55-character host; cloud.patchyhq.com/ still fits on one line.

Sol also confirmed: refusal titles are true for every handle create refuses (reserved, including d, takes its own branch first); every dynamic value is escaped; the input's accessible name is "Company handle /" from its two labels; aria-describedby, aria-invalid, autofocus and role="alert" agree; .field-rule only colours an adjacent hint, and the first render's pre-filled handle is valid, so nothing turns red on load. Safari supports :has() and :focus-visible from 15.4; the "!" / "" alt text needs 17.4, and older versions fall back to a plain !.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Codex review (GPT 6.1 Sol), round 2

Verdict: safe to merge. Both round 1 findings are fixed in b4c7f26 and the fix introduces nothing new. isHandleTaken follows the Effect service conventions, handleRefusal is an Effect.fn taking Companies from the environment, and the InvalidHandle catch runs the check before rendering. No Effect service or UI consistency findings.

@allisonmahmood
allisonmahmood merged commit 4a928f7 into main Oct 6, 2026
13 checks passed
@allisonmahmood
allisonmahmood deleted the fix/552-join-handle-warnings branch October 6, 2026 15:53
allisonmahmood added a commit that referenced this pull request Oct 6, 2026
…ease (#556)

What's new for this deploy, plus the history since the first production
deploy. The thin entries #555 seeded by hand are rewritten from what
each deploy actually shipped. This is the first run of `AGENTS.md` ›
Deploying: a fresh subagent gathered and wrote these releases, and I
checked them against the PRs.

**Release 4 (this deploy, `4a928f7..8697463`)**
- New: **See what's new in Patchy** (#555)

**Release 3 (2026-10-06, `aed1454..4a928f7`)**
- Fixed: **Creating a company explains a handle it can't use** (#553)

**Release 2 (2026-10-05, `48153dc..aed1454`)**
- Behind the scenes: key moments are recorded, identifying people by id,
never by name or email address (#538, #539, #541)
- Behind the scenes: the patchy command reports its version, command and
coding agent (#540)

**Release 1 (2026-10-05, first production deploy, `48153dc`)**
- Behind the scenes: Patchy Cloud's first release went live

Made by Claude Opus 5.5 via Claude Code in T3 Code.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core Touches the core area area:docs Touches the docs area area:server Touches the server area area:ui Portal and first-party browser pages, shared rendering and styles size:m 100-500 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

companies: a refused company handle is silent, so Create company looks broken

1 participant