Skip to content

feat: implement pane resizing functionality with shared components an… - #644

Merged
pikann merged 1 commit into
masterfrom
feature/implement-pane-resizing-functionality-for-sidebar-and-roadmap
Oct 27, 2026
Merged

pikann merged 1 commit into
masterfrom
feature/implement-pane-resizing-functionality-for-sidebar-and-roadmap

Conversation

@pikann

@pikann pikann commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lets users drag-resize the app sidebar and the Roadmap view's task column, addressing #628.

Changes

  • Shared width logic (lib/pane-width.ts): per-pane config (default, min, max, viewport ratio), clamping, localStorage persistence, and a usePaneWidth hook backed by a shared store so every consumer of a pane sees one width.
  • Shared splitter (components/shared/pane-resize-handle.tsx): pointer-drag handle following the WAI-ARIA window splitter pattern. Arrow keys resize, Home/End jump to min/max, Enter or double-click resets to default. Optional always-visible grip line.
  • Sidebar: right edge is resizable (200–480px, max 40% of the window, default 256px). Hidden on mobile and when collapsed; the width transition is disabled while dragging.
  • Roadmap: the "Task" header cell's right edge resizes the sticky task column (200–640px, max 60% of the window, default 280px). Subtask rows follow the same width. The grip is shown at rest so the splitter is easy to find.
  • i18n: paneResize.sidebar / paneResize.taskColumn added to all 9 locales.
  • Tests: unit tests for clamping, defaults and persistence round-trip.

Behavior notes

  • Widths are saved when a drag or key press ends and restored on reload. A pane left at its default stores nothing, so existing users see no change.
  • Widths are stored in the browser's localStorage (like the existing activity-pane width).

Not included

Testing

  • tsc -b and vitest run in apps/web pass; biome is clean.
  • Not yet verified manually in a browser.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — drag-resize for the app sidebar and the Roadmap "Task" column, on a new shared width module and splitter.

  • lib/pane-width.ts — PaneWidthConfig with SIDEBAR_PANE/ROADMAP_TASK_PANE, clamping helpers, localStorage read/store (clears the key at the default), and usePaneWidth backed by a module-level store keyed by storageKey so all consumers of a pane share one width.
  • components/shared/pane-resize-handle.tsx — WAI-ARIA window splitter: pointer drag with pointer capture, arrow-key steps, Home/End, Enter or double-click reset to default, optional grip line.
  • Sidebar — app-sidebar.tsx renders the handle on the right edge only when expanded and desktop; _authenticated.tsx drives --sidebar-width from the pane width and disables the container/gap width transition while dragging.
  • Roadmap — the sticky task column's width (header, rows, nested rows) now comes from ROADMAP_TASK_PANE; LEFT_COL_W is gone and the header carries the handle.
  • i18n / tests — paneResize.sidebar / paneResize.taskColumn added to all 9 locales; pane-width.test.ts covers clamping, defaults, and the storage round-trip.

ℹ️ A second, parallel width implementation still exists for the activity pane

components/shared/activity-pane-width.ts predates this PR and keeps its width in per-component state rather than the new shared store, so the codebase now has two side-by-side width systems that can drift. Nothing here is broken and migrating the activity pane is a reasonable scope boundary for this PR — worth a follow-up so the new "one width per pane" module becomes the single path.

Technical details
# Parallel pane-width implementations

## Affected sites
- `apps/web/src/lib/pane-width.ts:1` — new shared store + `usePaneWidth` (JSDoc: "every consumer of the same pane sees one width").
- `apps/web/src/components/shared/activity-pane-width.ts:1` — older `clampActivityWidth`/`readStoredActivityWidth`/`storeActivityWidth` plus hook-local `useState` in `activity-pane.tsx`.
- `apps/web/src/components/shared/activity-pane.tsx:139` — width held in component state, not the shared store.

## Open questions for the human
- Is migrating the activity pane onto `PaneWidthConfig`/`usePaneWidth` intended as a follow-up, or should the new module's scope be documented as sidebar/roadmap only?

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit d28ca1a into master Oct 27, 2026
2 checks passed
@pikann
pikann deleted the feature/implement-pane-resizing-functionality-for-sidebar-and-roadmap branch October 27, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Allow resizing and saving sidebar and Timeline task-pane widths

1 participant