Cymraeg Back to the CV

The Very Group, Principal Software Engineer

Enqueued UI

Several promotional surfaces, one screen, and nothing deciding which of them goes first.

November 2021 to June 2024. Presented internally at a Very Group Tech Talks session.

‘Timed’ vs ‘blocked’

  1. Home

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    We use cookies

    Required

    By selecting “Accept All”, you agree to the app storing information to enhance device navigation, analyse usage, and assist in our marketing efforts.

    Cookie Policy

    Accept All Manage settings

    Queue inspector

    1. Cookie sheet
    2. Onboarding card
    3. Rewards toast
    4. Free capacity

    head: cookie sheet · blocking

    Moment 1 · A blocker holds the screen

    The cookie sheet is a legal gate, so it blocks: nothing behind it runs until it is answered. The two behind it are not cancelled, and they are not racing it. They are waiting.

  2. Home

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    Welcome!

    Want to know a little more about what you can do with the Very app?

    Let’s Go!

    Queue inspector

    1. Onboarding card
    2. Rewards toast
    3. Free capacity
    4. Free capacity

    head: onboarding · blocking

    Moment 2 · The queue advances

    Answered, the sheet leaves and the onboarding card takes the head. It blocks too, but for a different reason, a product choice rather than a legal one, and a slot frees behind it.

  3. Home
    No connection detected, tap to retry

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    My Very Rewards

    Your exclusive benefits are now live!

    Not now View

    Queue inspector

    1. Rewards toast
    2. Free capacity
    3. Free capacity
    4. Free capacity

    head: rewards · timed, leaving on its own

    Moment 3 · Timed, and interrupted

    The rewards toast demands nothing and counts itself out. The connection banner above it is not in the queue at all: it arrives when the network drops, in its own layer, over whatever is showing. Deciding what is queued is half the design.

This is a drawing. Nothing here runs the library, the phone is a redrawing of The Very Group’s app rather than a screenshot of it, and the console under each one is an explanatory device the app never had. The three moments are shown together on purpose: a real queue is only ever in one of them, so a picture of one at a time would be inviting you to mistake it for the thing itself.

This is an animation, not the library running. It plays one fixed script on a loop, the taps in it are part of that script, and nothing on it can be pressed. The phone is a redrawing of The Very Group’s app rather than a recording of it, and the console underneath is an explanatory device the app never had.

Innovation Award Winner

LinkedIn

Read the post on LinkedIn Posted 19 October 2022.

The Very Tech Talk

The Very Group made this to announce the session. The edit, the branding and the captions in it are theirs. 0:47

Nothing is requested from YouTube until you press play.

Watch the clip on YouTube

Posted by their company account while I worked there.

LinkedIn

Read the post on LinkedIn

Important Message Interruption

An important message does not jump the queue. It takes three calls: cancel the queue, enqueue the message, then enqueue the dropped items again behind it.

  1. Home

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    My Very Rewards

    Your exclusive benefits are now live!

    Not now View

    Queue inspector

    1. Rewards toast
    2. Onboarding card
    3. Free capacity
    4. Free capacity

    cancelling · discarding waiting items

    Moment 2 · Cancel, enqueue, enqueue again

    The queue is cancelled. The onboarding card, still waiting, is discarded, and the toast’s wait is cut short where the message found it.

  2. Home

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    My Very Rewards

    Your exclusive benefits are now live!

    Not now View

    Queue inspector

    1. Rewards toast
    2. Legal message
    3. Free capacity
    4. Free capacity

    cancelled · legal message enqueued

    Moment 2, continued

    The legal message is enqueued first, so it sits directly behind the toast that is shutting down.

  3. Home

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    My Very Rewards

    Your exclusive benefits are now live!

    Not now View

    Queue inspector

    1. Rewards toast
    2. Legal message
    3. Onboarding card
    4. Free capacity

    dropped items enqueued again

    Moment 2, continued

    Then the onboarding card is enqueued again, behind the legal message. It is a new entry at the back of the queue, not the old one put back where it was.

  4. Home

    Welcome to Very

    Big
    autumn
    sale

    Plus a choice of ways to pay

    Amazing savings

    Incredible deals on brands you love are waiting for you right now

    Queue inspector

    1. Legal message
    2. Onboarding card
    3. Free capacity
    4. Free capacity

    head: legal · blocking, awaiting answer

    Moment 3 · It goes first, and the rest follow

    The toast’s exit has played, and the legal message presents at once, with the onboarding card waiting behind it. On screen it looks as if the message was inserted at the front.

This is a drawing, not the library running. The phone is a redrawing of The Very Group’s app rather than a screenshot of it, and the legal message was drawn for this figure and is not their wording. The console under each phone is an explanatory device the app never had, and the numbered blue marks are annotations drawn over the figure, not part of the app.

This is an animation, not the library running. It plays one fixed script on a loop, the tap in it is part of that script, and nothing on it can be pressed. It pauses while each numbered blue mark is shown, and nothing moves during a pause. The marks are annotations drawn over the figure, not part of the app. The phone is a redrawing of The Very Group’s app rather than a recording of it, the legal message was drawn for this figure and is not their wording, and the console underneath is an explanatory device the app never had.

Basic Principles (Library Demo App)

The library’s own demo app, redrawn. No phone and no product: just the queue, one banner at a time, with the ring showing how much of a wait is left and how much was thrown away.

Reduced motion is on, so the animation is replaced by three still frames from the same script.

Frame 1 · What is happening

Decision 1 holds the queue. It has no countdown, and Warning 2 waits behind it.

Decision 1 waiting for a tap

The file changed in two places, so we kept both copies.

Understood

Phase: waiting for a tap. No countdown and no end to the ring, because it waits on a person for as long as it takes.

on screenD:1 W:2
Frame 2 · What is happening

Cancel empties the queue. Warning 2 loses the rest of its rest, and its exit still plays.

Warning 2 sliding out

Storage is nearly full.

Phase: sliding out. The rest was cut short with 0.7 s left; the exit plays in full. The ring holds the rest that was thrown away.

on screenW:2 discarded E:2 W:3 M:2
Frame 3 · What is happening

Important discards everything that was waiting and takes over.

Important 1 resting

Read this one before carrying on.

Phase: resting, with 1.6 s of 2.9 s left on the ring. Important rests for longer than a normal banner, and Important 2 waits behind it.

on screenI:1 I:2 discarded E:3 W:5 M:4
Message (M) Warning (W) Error (E) Decision (D) Important (I)

This is a drawing, not the library running. It redraws the demo app that shipped with the library in 2022, with the product removed so only the queue is left. The banner wording was written for this figure. The ring is an explanatory device the demo showed as a countdown and nothing in a real app draws.

This is an animation, not the library running. It plays one fixed script on a loop, the taps in it are part of that script, and nothing on it can be pressed. It redraws the demo app that shipped with the library in 2022, so an important message here discards what was waiting and never brings it back, which is what that demo did and what Important Message Interruption deliberately does not do. The banner wording was written for this figure, and the ring is an explanatory device that nothing in a real app draws.

See the original library demo app

The walkthrough

A walkthrough of the library and its API, published under the name UIQueue. 13:59

Nothing is requested from YouTube until you press play.

Watch “UIQueue” on YouTube

Background

The NASCAR problem

A racing car covered in sponsor decals is the shorthand. Everybody has bought space on the same surface, and nobody has agreed how they share it. A large retail app has the same problem in time rather than in area. Each flow was written by a different team, and each is reasonable on its own.

Why it is harder than an ordering rule

A fixed priority list handles the easy case and none of the real ones. The sequence has to survive interruption: a deep link arriving mid-flow, a cancellation, a queue suspended and resumed rather than restarted, and new events inserted while it is already running.

Get it wrong and the failures are the ones users notice most. A modal over a modal. A prompt that reappears after being dismissed. A deep link swallowed because something else was mid-presentation.

What was built

A reusable library that let those sequences be declared rather than coordinated by hand, built on Combine and OperationQueue. Queues can be suspended and cancelled, dependencies can be configured between them, and further events can be inserted while a queue is running.

The result is that safe cancellation and re-queuing under interruption is a property of the mechanism, rather than something each feature team has to remember to implement. It ran across three white-label iOS apps responsible for over £100M in monthly revenue.