← Back to the blog

Slice 2: the ten-second form

The quick-entry form with colour-coded message type chips

This is the screen the whole app exists for.

When the radio crackles, the operator has seconds — not minutes — to log who called, who answered, and what was said. Paper wins today because a pen has no navigation stack. So the quick-entry form has one design target, written in the spec before any code: a routine entry in under ten seconds, at most four taps plus the message text.

The quick-entry form: automatic timestamp, colour-coded type row, suggestion chips, sticky submit button

How the form spends those taps:

  • Zero taps for the time. The timestamp is captured the moment you hit “Neuer Eintrag” — because that’s when the message arrived, not when you finish typing. It’s deliberately not editable: a logbook whose times can be fiddled with isn’t evidence. Corrections happen through explicit −1/−5 minute chips, and only backwards. The future is unreachable by design.
  • One tap for the type. Five color-coded chips in a single scrollable row — Funkspruch preselected because it’s most of all radio traffic. (The predecessor prototype stacked these vertically and burned a whole phone screen on it. Lesson committed to the repo.)
  • One tap each for Von and Zu. Suggestion chips appear under the fields, ranked by recency and frequency — your own call signs, learned from your own logbook, weighted toward the current Einsatz. Pick a source and the target suggestions re-rank by co-occurrence: if ELW usually talks to Leitstelle, Leitstelle is first. All of it is a page of plain Kotlin behind a SuggestionProvider interface — which is exactly where the private, on-device AI will plug in later. Same seam, smarter ranking, no data leaving the phone. More on that in a future post.
  • The message is the only typing. And the submit button is glued above the keyboard, always visible. Another predecessor lesson: a submit button below the fold is a submit button that doesn’t exist.

Everything above is unit-tested (17 tests now), and the whole flow ran on the emulator: first entry teaches the app “ELW”, second entry offers it back as a one-tap chip.

Next: the supporter screen — time to earn the “RevenueCat” in RevenueCat Shipaton.

Under the hood

The time budget, as written in spec 003:

tap "New entry" ──▶ timestamp captured (0 taps)
      │
      ├─ type chip ........................ 1 tap   (Funkspruch preselected)
      ├─ From chip ........................ 1 tap   (ranked suggestions)
      ├─ To chip .......................... 1 tap   (re-ranked for that From)
      ├─ message .......................... typing  (the only typing)
      └─ "Add entry" ...................... 1 tap   (sticky above the keyboard)
                                         ─────────
                                         4 taps + text  →  target < 10 s

The suggestions are a transparent heuristic, not a model. Each of the last 200 entries votes for its call sign; newer entries vote more, the current Einsatz counts double, and when a source is picked, targets that already appeared with that source get a 3× boost:

// HeuristicSuggestionProvider – recency × Einsatz × co-occurrence
var weight = exp(-indexNewestFirst / 40.0) *          // recency decay
             (if (entry.einsatzId == einsatzId) 2.0 else 1.0)
if (source != null && entry.source.equals(source, ignoreCase = true)) weight *= 3.0
scores[value] = (scores[value] ?: 0.0) + weight        // frequency = sum of votes

It sits behind a three-method interface. That seam is the whole AI plan: a smarter, on-device implementation can replace the heuristic without the form noticing.

interface SuggestionProvider {
    suspend fun suggestSources(einsatzId: String): List<String>
    suspend fun suggestTargets(einsatzId: String, source: String?): List<String>
    suspend fun suggestTemplates(type: MessageType): List<String>
}

#BuildInPublic #Shipaton