AI Suggestions
Offer AI-generated values, completions and next steps inline, so users accept good ones in one action and ignore the rest at no cost.
6 states5 edge casesDesktop + Mobile
01The problem
Many AI features don't need a chat: they need to fill in a category, propose a reply, complete a sentence or suggest an assignee. Inline suggestions can save time across every form, but if they're hard to tell apart from user input, accepted by accident, or interrupt typing, users stop trusting the whole product.
02When to use
Use when
- Fields with predictable values: categories, tags, assignees, due dates
- Writing surfaces: replies, descriptions, commit messages
- Next-step suggestions after an action (“Create follow-up task?”)
Avoid when
- The value has legal or financial consequences and needs deliberate entry.
- Suggestion quality is low — a bad suggestion is worse than none.
03Recommended UX
Statecraft recommendation
Show suggestions in a visually distinct style that can't be mistaken for user input — ghost text, a dotted outline or an AI marker — accept with one explicit action (Tab or a button), dismiss by simply continuing, and never overwrite anything the user has typed.
Distinct styling prevents the most damaging failure: a user submitting an AI value they never actually read.
Accept must be deliberate; ignore must be free. If dismissing costs effort, suggestions feel like nagging.
Users' own input always wins. A suggestion that replaces typed text breaks trust immediately.
04Interaction flow
- 01
User reaches field
Suggestion computed from context.
- 02
Suggestion shown
Ghost text or chip with AI marker.
- 03
Accept or ignore
Tab / click accepts; typing dismisses.
- 04
Accepted value
Becomes normal input, editable; marked as suggested in history.
Result
- Accepted
- Edited
- Ignored
05Desktop behaviour
On desktop, completions appear as ghost text and field suggestions as a small chip beside the field.
Desktop rules
- Ghost text in a lighter colour after the cursor; Tab accepts, Esc or typing dismisses.
- Field suggestions as a chip: “✦ Suggested: Travel · Accept”.
- Show a short reason on hover where useful: “Based on 12 similar expenses”.
- Never auto-fill required fields silently on load.
06Mobile behaviour
There's no Tab key on mobile. Suggestions become tappable chips above the keyboard or beside the field.
Mobile rules
- Suggested values as tappable chips under the field.
- Completions as a chip above the keyboard: “✦ …and I’ll send it by Friday”.
- Keep suggestions to one or two; more becomes a menu users have to read.
07States
No suggestion
Field behaves normally.
Loading
No spinner in the field; suggestion simply appears when ready.
Suggested
Distinct style with AI marker and accept action.
Accepted
Becomes normal input; can be edited.
Dismissed
Hidden for this field until context changes.
Low confidence
Not shown — or shown as options rather than a single answer.
08Edge cases
EC-01
Suggestion arrives while typing
The user has started typing when the suggestion returns.
Recommendation
Only show it if it still matches what they've typed; otherwise discard it.
EC-02
Bulk acceptance
An import shows AI-suggested categories for 300 rows.
Recommendation
Allow “Accept all” per column, with low-confidence suggestions excluded and highlighted for review.
EC-03
Wrong suggestion accepted
The user tabs through and accepts a wrong category.
Recommendation
Mark AI-filled fields in the record history and keep Undo available until save.
EC-04
Repeatedly ignored suggestions
A user dismisses suggestions in a field every time.
Recommendation
Back off for that field and let users turn suggestions off per field type.
EC-05
Latency
Completions take 1.5 s to arrive.
Recommendation
Show nothing until ready and cancel requests on further typing. A late suggestion is noise.
09Microcopy
Field chip
Avoid
“AI says: Travel”
Prefer
“✦ Suggested: Travel · Accept”
Reason
Prefer
“Based on 12 similar expenses from this vendor”
Bulk
Prefer
“Accept 284 suggestions · 16 need review”
Setting
Prefer
“Suggest categories automatically”
10Accessibility
- Ghost text is announced as a suggestion (e.g. via aria-describedby) and is never part of the input's value until accepted.
- Accept is available via a labelled button as well as Tab.
- The AI marker has a text alternative: “AI suggestion”.
11Developer notes
- 01
Request suggestions with debouncing and cancellation; ignore stale responses.
- 02
Store whether a value was suggested, accepted or edited for quality measurement.
- 03
Set confidence thresholds per field; below them, show nothing.
- 04
Cache suggestions per record and context to avoid repeated calls.
12Implementation prompt
For Claude Code, Codex or Cursor
Implement inline AI suggestions.
Requirements:
- Field suggestions as a distinct chip ("✦ Suggested: Travel · Accept") with optional reason on hover.
- Text completions as ghost text after the cursor: Tab accepts, Esc/typing dismisses; never part of the value until accepted.
- Never overwrite user input; drop suggestions that no longer match what's typed.
- Debounced requests with cancellation; nothing shown until ready.
- Confidence thresholds per field; low confidence hidden or shown as options.
- Bulk accept per column with low-confidence items excluded.
- Track suggested/accepted/edited per field; mark AI-filled fields in history.
- Per-field setting to turn suggestions off; back off after repeated dismissals.
- Accessibility: announced suggestions, labelled accept button, text alternative for AI marker.
- Mobile: tappable chips under fields and above the keyboard.
Do not redesign the existing interface.