How It Works

Why Window Titles Break Idle Tracking: Separating Presence From Context

Why polling window titles causes false active time from clocks and videos, and how TIMO360 separates real hardware input from application context.

TIMO360 logoTIMO360 Team3 min read
Why Window Titles Break Idle Tracking: Separating Presence From Context

Key takeaways

  • Window title changes from unread badges, live clocks, running builds or playing videos never prove a human is present — resetting idle timers on them breaks idle detection.
  • TIMO360 separates Presence Signals (keyboard/mouse input, app switches, unlock/wake) from Context Signals (WINDOW_CHANGED) so titles split sessions without resetting idle.
  • Idle starts are backdated to when hardware input actually stopped and flanked by a 1-minute server sweep plus a 2-hour unreachable reclassification job.
  • Redis device locks serialize concurrent event batches so retries and crash restarts never produce duplicate overlapping timeline rows.

If you leave a work laptop open with a Slack unread counter in the title bar, a live build running in a terminal or a browser tab updating a dashboard clock, the active window's title changes automatically every few seconds — even while nobody is in the room.

In naive time trackers that treat every polled window-title update as user activity, that single quirk breaks idle detection completely: an employee can step away for an hour and appear "Active" the entire time. Fixing that cleanly requires separating presence from context across both the desktop agent and the backend session engine.

Presence Signals vs. Context Signals

In TIMO360's session engine (session-aggregator.ts) and desktop agent, signals fall into distinct categories with strict rules:

  • Presence signals (PRESENCE_SIGNALS): Hardware KEYBOARD_ACTIVITY and MOUSE_ACTIVITY heartbeats, foreground APPLICATION_CHANGED switches (which require a click or Alt-Tab rather than a self-updating title), plus SYSTEM_UNLOCK and SYSTEM_WAKE. Only presence signals reset the idle clock.
  • Context signals (CONTEXT_SIGNALS): WINDOW_CHANGED splits the active timeline row so reports reflect what was in front, without ever refreshing lastActivityAt or marking an idle person active.
  • Suspend signals (SUSPEND_SIGNALS): SYSTEM_LOCK, SYSTEM_SLEEP and IDLE_START unambiguously close or transition the active working span.

The desktop agent enforces the same rule locally: its lastSignalAt clock refreshes strictly on measured HUMAN_INPUT_SIGNALS (keyboard, mouse, unlock, wake), never on polled title diffs.

Backdating Idle Start and Reconciling Silent Machines

Counting idle time accurately also depends on when a session turns idle. If an employee stops typing at 2:00 PM and returns at 3:30 PM, waiting until 3:30 PM to log idle would make an afternoon away look active for 90 minutes on the live dashboard.

  1. Backdated IDLE_START from the agent: The Rust poller checks OS-wide idle duration every 5 seconds. Once silence crosses the organization's configured threshold (5 minutes by default, synced from /agent/settings), the agent stamps IDLE_START at the moment input actually ceased and flushes immediately instead of waiting for the next 20-second tick.
  2. One-minute server idle split: If an agent stops sending batches abruptly, SchedulerService.closeIdleOpenSessions sweeps open ACTIVE sessions every minute and splits silent ones into an active span plus an open IDLE session so the dashboard and timeline agree.
  3. Two-hour unreachable reclassification: If a device disappears completely for over two hours (hardware replacement, uninstall or dead battery), closeUnreachableDeviceSessions flips the open IDLE session to OFFLINE so dead machines stop inflating daily idle totals.
  4. Midnight auto punch-out: Every five minutes, autoClosePastMidnightSessions closes sessions left open past local midnight in the organization's timezone.

Preventing overlapping timeline rows with Redis locks

If an agent crashes mid-flight or a slow request retries after a timeout, two overlapping batches for the same device could read the same open session concurrently. ActivityIngestionService wraps each device's continuation inside a 15-second Redis lock (session-lock:<deviceId>) so batches apply strictly in order.

Inferring Browser Domains From Window Titles Without Full URLs

Because TIMO360 never captures full page URLs or query strings, our backend uses a conservative lookup (infer-domain.ts) when summarizing website activity from browser window titles. It strips trailing browser suffixes (such as - Google Chrome or - Microsoft Edge), matches explicit domains or well-known site names (like github.com or figma.com), filters out generic tabs like New Tab or Settings, and returns null rather than guessing on ambiguous titles.

Combined with metered breaks that pause tracking and marked meetings that count as active without window-title spying, every hour on a report maps back to real, defensible signals. Explore Activity Level Tracking or see how Breaks and Meetings stay fair.

Ready for Attendance & Presence Tracking That Respects Your Team?

Set up your organization, install the agent, and start seeing attendance and presence data in minutes — without a single keystroke or screenshot recorded.

Windows, macOS & Linux Pay per employee license Zero keystroke or screen capture
Chat with us