You have only just started logging. Then OBubba says:
> “Maya’s longest sleep so far.”
It can feel like a milestone—or a promise that the difficult nights are ending. But what does so far cover? Did the app compare every night since birth? Does one long stretch mean the baby is sleeping through?
No. We traced the current function and the exact seven calendar-day slice passed into it. The card is a deliberately small, early reward: the longest qualifying nap or sleep in the recent record while OBubba is still learning.
The short answer
The current app can show the longest-sleep celebration when all of these are true:
| Check | Current rule | What it means | |---|---:|---| | Early-use window | 3–25 loggable moments | There is enough activity for a first observation, but the activation card has not retired | | Calendar window | Today + previous 6 days | “So far” means this supplied seven-day snapshot—not lifetime history | | Entry type | A saved nap or sleep | Both daytime and night sleep can qualify | | Complete arc | Start and end are present | An open timer cannot produce a duration | | Notable duration | At least 2h 30m | Short naps do not earn the celebration | | Plausibility cap | No more than 16h | Very long timer arcs are rejected |
If several sleeps qualify, the engine chooses the longest duration. It formats the result plainly—such as “7h 35m”—and labels it a low-urgency celebration.
The card is factual about one saved timer arc. It is not a sleep score, developmental grade or forecast.
“So far” is seven days, not all time
The early-read function could accept any sequence of days. In the real caller, it receives exactly seven local calendar buckets:
- today;
- yesterday; and
- the five days before that.
That makes the title warmer than “longest sleep in the current seven-day activation window,” but the technical meaning is the latter.
A longer stretch from two weeks ago is outside this calculation. A stretch saved to the wrong calendar day may not be where a parent expects. And because today is included, the window is partly unfinished.
Treat the number as the best complete sleep currently visible to this early card, not a permanent personal best.
Why it can appear after only three logs
The activation gate counts recent entries whose types are feed, nap, sleep, wake, nappy, solids, pump. It needs at least three in total, but the winning sleep observation itself can still be a single timer arc.
For example:
| Recent record | Counts toward the 3-log gate? | Can become the longest sleep? | |---|---:|---:| | Night sleep, 20:00–02:45 | Yes | Yes—6h 45m | | Morning bottle | Yes | No | | Wet nappy | Yes | No |
Those three moments are enough to enter the early-use window. The sleep is then the one qualifying arc that supplies the displayed duration.
That distinction matters. Three total logs are not three nights of evidence. The app’s generic trust-caption helper deliberately says nothing for a one-observation sample, so this particular card does not pretend the maximum has statistical confidence.
The priority rule parents cannot see
The early function can create three kinds of first payoff, in this order:
- longest qualifying nap or sleep;
- average daytime milk-feed spacing, when there are two to four usable gaps; or
- average daytime wake windows, when there are at least two usable gaps.
The first matching result returns immediately. So a 3-hour nap can make the sleep celebration appear even when the same record also contains enough feeds for a first spacing average.
This does not mean sleep is medically more important than feeding. It is a product choice: a notable stretch is the most emotionally legible early observation, while the other reads remain available when no long sleep qualifies.
What the duration calculation actually does
For each nap or sleep with two endpoints, subtracts the start minute from the end minute. If the answer is negative, it adds 24 hours so an overnight arc can cross midnight.
Examples:
| Saved arc | Calculated duration | Result | |---|---:|---| | 09:10–10:00 | 50m | Too short for this card | | 13:00–15:30 | 2h 30m | Qualifies at the boundary | | 20:00–02:45 | 6h 45m | Qualifies after midnight wrap | | 19:00–12:00 | 17h | Rejected above the 16h cap |
The cap is a useful corruption guard, not proof that every duration below it is accurate. A forgotten timer stopped 15 hours later can still fit inside the function’s allowed range.
One timer arc is not necessarily unbroken sleep
The longest-sleep detector only sees the saved start and end. It does not subtract events that occurred inside the arc.
If the baby woke, fed and resettled but the sleep timer stayed open, the card may describe the entire outer arc as one sleep. If the parent stopped and restarted the timer around that wake, the app sees two separate stretches.
That means the most useful logging convention is consistency:
- stop the timer for a meaningful wake you want represented;
- restart it when sleep begins again;
- edit a forgotten endpoint when you notice it; and
- use notes for a brief stir that you intentionally consider part of the same sleep.
There is no universal perfect definition for every family. The important thing is that “a sleep” means roughly the same thing across your own record.
It does not mean “sleeping through the night”
The detector has no special sleeping-through threshold. A daytime nap can win. A 2h 30m night stretch can win. There is no check for bedtime, morning wake, number of feeds, age, whether the parent slept, or whether the baby woke briefly inside an open timer.
The NHS notes that babies vary widely: some sleep in short bursts and others in longer stretches, patterns change with growth, and young babies commonly need night feeds. Comparing one baby with another is rarely useful.
So read the celebration as:
> “Here is the longest complete sleep arc in this recent record.”
Not as:
> “Your baby now sleeps through, has reached an age milestone, or should repeat this duration tomorrow.”
Do not chase the record
A longer number is not always a parenting goal. Do not delay a feed, ignore illness, stretch a wake window or keep a baby awake to beat yesterday’s best.
Follow responsive feeding and any individual advice you have been given, particularly for a newborn, a premature baby, a baby with growth concerns or a baby whose clinical team has asked you to wake for feeds. If a baby is unusually difficult to wake, feeding poorly, has fewer wet nappies than expected or simply seems unwell, seek appropriate medical advice rather than waiting to see what the tracker says.
The card has no age gate and no knowledge of a feeding or growth plan. Your baby’s needs outrank its celebration.
Why the card disappears
The early read checks the total number of loggable moments in the same seven-day slice every time it runs:
- 0–2: too early for this particular card;
- 3–25: an early observation may appear;
- 26 or more: this activation card returns nothing.
Retirement is intentional. It does not mean the long stretch was erased or that sleep has worsened. It means the parent has moved beyond the tiny early-payoff stage, where OBubba can begin relying on richer predictors, trends and pattern detectors.
Because the dismissal identity is date-based, the early card can gently refresh on a new day while the family remains inside the activation window. A changed title or duration is still only the newest seven-day snapshot.
A better way to use the celebration
Instead of asking “How do I make this longer?”, ask:
- Was the timer accurate? Correct a forgotten start or stop.
- Was the sleep safe? Keep safer-sleep practice constant regardless of duration.
- What surrounded it? Note illness, travel, nursery, an unusual nap day or a changed bedtime without assuming causation.
- Does it repeat? Let later trend cards answer that with more nights.
- How did the baby seem? Feeding, nappies, comfort and alertness matter more than a record.
This turns a pleasant moment into a useful baseline without putting pressure on the next night.
Safer sleep does not change when sleep gets longer
The current NHS safer-sleep advice says the safest place for a baby’s first six months is in a cot, lying on their back, in the same room as a caregiver. The sleep surface should be firm and flat, and the cot should be clear of pillows, bumpers, loose bedding, toys, pods and nests.

The safest setup matters for naps and nights, short stretches and long ones. An app total cannot make an unsafe sleep space safer.
Explore OBubba’s baby sleep tracker → — time sleeps, correct missed endpoints and let early observations give way to patterns built from your own baby’s real days.
Frequently asked questions
Does “longest sleep so far” mean since birth?
No. In the current caller, it means the longest qualifying nap or sleep in today plus the previous six local calendar days.
Why did a nap beat the night sleep?
The detector treats both `nap` and `sleep` entries as candidates. Whichever qualifying complete arc is longer wins.
Why did no card appear after a 2-hour sleep?
This celebration requires at least 2h 30m. The family must also have between three and 25 recent loggable moments, and the sleep needs both a start and an end.
Does the app check for feeds during the sleep?
Not inside this function. It compares the saved sleep endpoints. If a feed happened inside an unclosed timer, the outer arc may still be treated as one sleep.
Why is there no “from N nights” label?
The displayed value is one maximum observation, not an average or trend. Its sample size is one, and the shared confidence-caption helper stays quiet below two samples.
Is 16 hours a recommended maximum sleep length?
No. It is a software plausibility cap for this calculation, not age-based sleep guidance or advice to wake at 16 hours. Follow your baby’s feeding and clinical plan.
Will dismissing it hide all early reads?
The card’s dismissal key is tied to the day. It can refresh on a later day while the activation conditions still hold, then retires once the recent log count exceeds 25.
Reliable UK sources
- NHS Best Start in Life: Your baby’s sleep patterns
- NHS Best Start in Life: Safer sleep advice for babies
- NHS: Helping your baby to sleep
OBubba records timer arcs and offers general pattern education. It cannot observe sleep, know whether a wake occurred inside an open timer, assess feeding or illness, diagnose a sleep problem, or replace advice from a midwife, health visitor, GP, NHS 111, paediatric or neonatal team.
Ready to try OBubba?
Use OBubba to track feeds, sleep, naps, nappies, growth, milestones and family handovers in one calm baby tracker app.