Designing a Physical Desktop Reminder for AI Coding Assistants

    This article describes a physical desktop reminder that turns status events from AI coding assistants into subtle actions on a desktop peripheral. It covers the problem and design goals, a layered architecture, a unified state model with action mapping, software integration with pseudocode, firmware design, reliability and fallback handling, and privacy-first deployment. Developers who run long, interactive AI coding sessions can use this design to notice when a tool is waiting for input without watching the screen constantly.

    1. Background and Design Goals

    AI coding tools are moving from single-shot code completion toward session-based collaboration. A tool keeps running tasks and pauses at key moments to wait for the developer to confirm an action, provide more instructions, or resolve an error. If the developer switches to another window at that point, the waiting event can get buried among system notifications. This leads to idle tasks, higher context-switching costs, and missed interactions.

    A physical desktop reminder maps state events from the digital side to visible actions on a desktop peripheral, such as a periodic hop, a light change, or a short vibration. The developer notices that attention is needed through peripheral vision, without having to watch the screen.

    The design goals fall into five points:

    • Low interruption: Actions should be brief and configurable, and they should support do-not-disturb mode.
    • Immediate awareness: Waiting-for-confirmation events take priority over routine progress events.
    • Graceful degradation: When the peripheral disconnects, the system falls back to system notifications or logs.
    • Privacy first: Only state metadata is transmitted. Code and input content are never sent.
    • Extensibility: Adapters connect different editors, command-line entry points, or local services.

    2. Overall Architecture: Layered and Decoupled

    The recommended design uses four layers:

    1. Event collection: Captures events from editor plugins, command-line wrappers, local service hooks, or status logs.
    2. State normalization: Converts events from different sources into a unified state model. This layer also applies debouncing, throttling, and priority ordering.
    3. Transport and driver: Sends action commands through a local loopback interface or a general peripheral connection protocol.
    4. Execution: The desktop peripheral performs the feedback, such as hopping, lighting, or vibrating.

    The layers communicate through state events rather than business content. This reduces coupling and limits privacy exposure.

    The following diagram shows the flow:

    1. Editor / command line / local service
    2. │ reports state metadata only
    3. ▼
    4. Event collection adapter → State normalization → Action dispatch queue → Peripheral driver → Desktop peripheral
    5. │ │
    6. └── Local logs / monitoring ──────────────────┘

    3. State Model and Action Mapping

    A unified state model is the key to reusing this design. Define at least six states: idle, running, waiting for confirmation, error, done, and paused.

    The waiting-for-confirmation state has the highest priority. It should trigger a noticeable action that the user can turn off. The running state uses only a low-frequency breathing light so it does not interrupt the developer. The error state combines a short vibration with a red light. The done state uses a brief green light to signal completion. Action parameters should be configuration items, not hard-coded values.

    State Trigger condition Example action Default policy
    Waiting for confirmation The tool requests manual input or confirmation Periodic hop or sway One group every 30 seconds, stops after confirmation
    Error The task fails or needs manual intervention Short vibration with red breathing light Single reminder, with a cap on repeats
    Done The task finishes normally Green fade-in for 5 seconds Does not interrupt current input
    Running A long task is in progress Slow breathing light Can be turned off
    Paused The user pauses the task Steady dim light Low priority

    Action scheduling needs debouncing and throttling. If the same session reports waiting for confirmation several times in a short period, keep only one reminder. When several sessions wait at once, merge them based on priority and last active time. During quiet hours, log the events but do not drive the peripheral.

    The action queue should use a backpressure policy. Critical events are never dropped, and ordinary events can be merged.

    4. Software Integration and Pseudocode

    The recommended integration pattern is a local daemon with adapters. Editor plugins, command-line wrappers, and local services only report events. The daemon handles normalization, throttling, and action scheduling in one place. Each event contains only metadata: type, session ID, timestamp, and priority. It does not include code snippets, natural language input, or file paths.

    1. event = {
    2. type: "WAITING_CONFIRM",
    3. session: "s-1024",
    4. ts: 1710000000,
    5. priority: 2,
    6. payload: {} // Contains no code or input content
    7. }
    8. function handle(event):
    9. e = normalize(event)
    10. if inQuietHours(now) or muted(e.session):
    11. logOnly(e)
    12. return
    13. e = throttle(e, window=2s)
    14. action = mapStateToAction(e.type)
    15. queue.push(action, priority=e.priority)
    16. function mapStateToAction(type):
    17. if type == "WAITING_CONFIRM": return periodicHop()
    18. if type == "ERROR": return shortVibrateAndRed()
    19. if type == "DONE": return greenFade()
    20. return lowPriorityBreath()

    The pseudocode makes three points. First, normalize events before making decisions so adapter logic does not grow. Second, filter events before queuing them so no useless actions run. Third, keep actions separate from states so the peripheral hardware is easy to replace.

    5. Peripheral and Firmware Design

    A desktop peripheral can be built from a main controller, actuators, light or vibration units, a standard peripheral interface, or a wireless connection module.

    Firmware should maintain an action queue and heartbeat status. It should execute commands without blocking, so a long action does not delay new events. Set safety limits on action amplitude, frequency, and duration. After a disconnect, the device returns to a safe position. On power-up, the device runs a self-test and reports its capabilities so the host can adapt to it.

    The key design points are:

    • Heartbeat and timeout: The host sends heartbeats regularly. If the peripheral does not receive one before the timeout, it stops its actions.
    • Idempotent commands: Sending the same command again does not stack its effects.
    • State snapshot: After reconnection, the host sends the current highest-priority state.
    • Rate limiting: High-frequency commands are capped to prevent actuator overheating and mechanical wear.

    6. Reliability and Fault Tolerance

    The reminder chain should assume that the peripheral may disconnect, processes may restart, and events may be duplicated. Keep a local cache of the most recent state snapshot. Use exponential backoff for reconnection retries.

    Resend critical events, such as waiting-for-confirmation, once after reconnection. Routine progress events can be dropped. If an action fails, fall back to a system notification or a local log. The daemon should use a single-instance lock so multiple adapters do not drive the peripheral at the same time.

    For observability, record the number of received events, normalization failures, action dispatch latency, peripheral connection status, and fallback count. If a team already uses Baidu AI Cloud, it can send de-identified state events to that platform’s general-purpose logging and alerting services for centralized monitoring. This does not change the local reminder path, and it does not upload code content.

    7. Privacy, Security, and Deployment

    Privacy follows a minimal-metadata principle. Report only the state type, timestamp, priority, and an anonymous session identifier. Do not collect code, input text, file names, or window titles.

    For transport, prefer local loopback or a controlled local network. Enable authentication and grant least-privilege access. Log retention should be configurable, with short retention by default.

    For deployment, start with a single-machine pilot. Provide a global switch, quiet hours, action intensity settings, and per-session muting. Track confirmation response time, missed reminder rate, false trigger rate, and a subjective interruption score. Adjust thresholds weekly based on these metrics.

    Overall, a physical status reminder complements on-screen notifications. It adds a low-bandwidth, low-interruption sensing channel for AI-assisted coding. With a unified state model, adapter-based integration, configurable action scheduling, and reliable fallback behavior, teams can notice waiting-for-confirmation events sooner without exposing business content.