Adam Bandel


Task Windows

Nov 2025
Type: web-app
Code: 8k lines
Files: 33
Active: Nov 2025 to Nov 2025
Stack:
TypeScriptNext.js 16React 19ZustandTailwindCSSdnd-kit
Tags:
productivitydeveloper-tools

Overview

Task Windows is a task manager that schedules work into 3-day windows instead of single days. A new window starts every day and covers that day and the next two, so a task goes into a three-day span instead of onto one date. Tasks that take longer can span several windows. Each window has a point budget, and a capacity bar shows how much of it is already committed. Everything moves by drag and drop, and holding Shift, Ctrl or Alt during a drag sets a task’s points, context or project instead of moving it.

Screenshots

Main Dashboard

Point Assignment Overlay

Sidebar with Heatmap

Problem

Calendar-style task managers make you put every task on a specific day. A task that doesn’t fit neatly into one day slips to the next, and gets rescheduled again and again. Most of them also have no sense of capacity, so it’s easy to overcommit without noticing until you burn out.

Approach

At the center is an engine that builds everything on screen from a flat list of tasks. Each task has a home window and a span. The engine puts the task in its home window and adds a ghost copy, faded and not draggable, to each later window the span covers.

Stack

Challenges

Outcomes

Storage and display are separate. Tasks are stored as a flat list, and everything on screen, ghosts and capacity included, is recomputed from that list on every change. Edits to tasks show up immediately and roll back if the save fails. The modifier overlays can take more drag actions without adding buttons to the UI.

Implementation Notes

The engine builds the window data from the task list:

export function generateEngineState(
    allTasks: Task[], 
    now: Date = new Date(), 
    viewOffset: number = 0,
    settings: Settings,
    contexts: Context[] = [],
    projects: Project[] = [],
    visibleColumns: number = 4,
    dragSourceWindowIndex?: number | null
): AppState {
    // Tasks are distributed to windows based on home_window_index and span_windows
    // Ghost instances created for i !== home where i is in [home, home + span - 1]
    // Capacity calculated per-window and for 3-window clusters
}

The collision detection checks which modifier is held and prefers the matching drop zones:

const customCollisionDetection: CollisionDetection = useCallback((args) => {
    const pointerCollisions = pointerWithin(args);
    const { isShiftHeld, isCtrlHeld, isAltHeld } = useTaskStore.getState();
    
    // Shift: prioritize point-assignment zones
    if (isShiftHeld && !isCtrlHeld && !isAltHeld) {
        const pointZone = pointerCollisions.find(c => c.id.toString().includes('-pts-'));
        if (pointZone) return [pointZone];
    }
    
    // Ctrl: prioritize context zones
    // Alt: prioritize project zones
    // ...
}, []);

The day changes at 4 AM Central time instead of midnight, so anything done before 4 AM counts toward the previous day:

export function getLogicalDate(now: Date = new Date()): string {
    const zoned = toZonedTime(now, 'America/Chicago');
    const shifted = subHours(zoned, 4); // Work before 4 AM counts as previous day
    return format(shifted, 'yyyy-MM-dd');
}

Related Posts

No posts yet.