Skip to content

fix(plugin-gantt): the timeline column width is a flat floor, not a dead breakpoint table - #7591

Merged
os-project-manager merged 1 commit into
mainfrom
claude/issue-7228-gantt-column-width
Sep 4, 2026
Merged

fix(plugin-gantt): the timeline column width is a flat floor, not a dead breakpoint table#7591
os-project-manager merged 1 commit into
mainfrom
claude/issue-7228-gantt-column-width

Conversation

@os-project-manager

Copy link
Copy Markdown
Collaborator

Fixes #7228

Clause-②: no

columnWidthForContainer is declared without export in GanttView.tsx; the package entry
packages/plugin-gantt/src/index.tsx never names it, and the package publishes exactly one
path (. to dist/index.d.ts). A repo-wide git grep finds two occurrences before this
change — the definition and its single call site, both inside GanttView.tsx. Nothing
authorable, nothing accepted or rejected, no published surface widened or narrowed. Answered
from the export graph, not from expectation.

The measurement came first, because it decides the repair

Triage refused to queue this until someone established whether 110 is right at all three
tiers (collapse the table) or whether the narrow tiers were meant to differ and the table was
never finished (restore a curve). That is history, not taste.

The function was born a real curve, and a later commit flattened it deliberately.

commit shape value
81781fb04 born as getResponsiveColumnWidth(), reading window.innerWidth 35 / 50 / 60
a2d7023b7 renamed to columnWidthForContainer(width), container-derived 35 / 50 / 60
cb7e05a50 (#1870) flattened 110 / 110 / 110
bf244f400 (#7420) untouched (context only in that diff) 110 / 110 / 110

So the fork's second arm is reached — a curve existed and a later change flattened it — and
the deliberateness test the dispatch asks for comes back deliberate, on four independent
pieces of evidence inside the flattening commit itself:

  1. cb7e05a50 is a squashed PR, and one of its own sub-commit titles is
    "fix(plugin-gantt): floor timeline columns at 110px so day/week/month stay readable"
    it names the concept (floor), the value, and the reason.
  2. The stage immediately before it in the same PR had just re-tuned the curve as a curve
    ("Default column width was too narrow (35/50/60). Bumped to 44/64/80 so day/week/month
    columns have room to breathe"
    ). The flattening is the next deliberate step, not a
    collision of sloppy edits.
  3. The comment added by that same commit records the value's provenance —
    "even in narrow embeds (user-specified minimum)". Raising the narrow arms from 44/64
    up to 110 is the content of the change: a minimum applied everywhere.
  4. It states why flatness costs nothing at the wide end: "A short project still fills a roomy
    timeline via the fit-stretch below; manual zoom can override either way."
    Both mechanisms
    are real and still in the file.

A deliberately flattened helper is the dispatch's Route 1. Nobody is proposing to restore a
curve here — the design call was already made and recorded; only the code's shape lied about
it. Route 1, mechanical. No responsive behaviour is invented, and none is restored.

Consistency with #7420, which just ruled on this file

That PR imposed a convention on the same breakpoint family, and this follows it rather than
inventing a third one: fixed px values become named module constants with a doc comment
tracing the value
; helpers stay somethingForContainer(width) functions only where they
genuinely vary
with the container. showStartEndColumns stayed a function because it varies;
TASK_LIST_MIN_W went the other way — #7420 deleted the function-local const and hoisted it
to a module constant used directly at every site.

columnWidthForContainer does not vary with its argument, so keeping it a function named
...ForContainer would restate the same lie in a smaller form. It becomes BASE_COLUMN_W,
hoisted exactly like TASK_LIST_MIN_W.

⚠️ Scope fence honoured: showStartEndColumns, taskListWidthForContainer,
rowHeightForContainer and the date sublabel are untouched here.

Behaviour equivalence — by exhaustion, not by sampling

The old function was total over number and every path returned the same literal:

input interval before after
width < 640 (incl. negatives, -Infinity) 110 110
640 <= width < 1024 110 110
width >= 1024 (incl. +Infinity) 110 110
NaN — both comparisons false, falls to the third arm 110 110

There is no input, NaN included, at which the two disagree, so this is equivalence by
exhaustion over the whole domain. Three further facts close the call-site side:

  • The sole call was columnWidthForContainer(effectiveWidth), whose argument is a plain
    number binding — deleting the call removes no side effect.
  • baseColumnWidth was a local alias holding that same constant. Its five uses now read
    BASE_COLUMN_W directly; columnWidth still resolves as
    columnWidthOverride ?? fitColumnWidth ?? BASE_COLUMN_W.
  • It was also a useMemo dependency. It never changed across renders (always 110), so
    dropping it from the array cannot change when that memo recomputes — and a module constant
    is not a valid dependency in the first place.

Verification

Every reading below was taken at 1735f6150, the branch head, with a clean tree.

  • Package suite: 63 files, 496 tests, all passing. pnpm exec vitest run packages/plugin-gantt/ from the repo root (the canonical invocation this repo's guard
    enforces). The suite ran 63 files and the tree contains exactly 63 test files, so nothing
    was silently globbed out; origin/main carries 62, this branch adds the 63rd.
  • type-check: exit 0turbo run type-check --filter=@object-ui/plugin-gantt, 14/14
    tasks successful, with the dependency closure built first (dependsOn: ["^build"]), since a
    stale dist/*.d.ts lies in both directions. Verified it actually covered the new code rather
    than excluding it: tsc -p tsconfig.test.json --listFiles contains both GanttView.tsx and
    the new test file.
  • Lint: exit 0, and zero verdicts moved. pnpm --filter @object-ui/plugin-gantt lint
    0 errors / 352 warnings. Measured before and after by restoring the pre-fix blob and
    re-linting: 93 files, 2 errors, 356 warnings, identical on both sides, and GanttView.tsx
    is 0 errors / 12 warnings with an identical rule multiset
    react-refresh/only-export-components 5, @typescript-eslint/no-explicit-any 3,
    react-hooks/set-state-in-effect 2, react-hooks/exhaustive-deps 2. (Those 2 errors are
    pre-existing and appear on both sides; --no-inline-config is what surfaces them.)
  • Repo-wide lint is CI's run. The narrowing here is declared and measured, not skipped:
    the file population was read from eslint's own config resolution (93 files, counted from
    --format json, not guessed); packages/plugin-gantt is the only package this diff touches
    (the other path is a .changeset/*.md, which eslint does not lint); and eslint.config.js
    enables no type-aware linting — zero occurrences of parserOptions, projectService or
    recommendedTypeChecked in a 17.5 KB config — so this diff cannot move a verdict on a file it
    does not contain.
  • Gate family derived from the touched paths, all exit 0: check:control-bytes,
    check:vi-mock-specifiers, check:vi-mock-inherit, check:element-data-source-declaration,
    check:shell-escape-residue. Plus a manual control-byte sweep over the diff's own files.

Reverse verification — the pair that fits a behaviour-preserving change

A red-then-green does not apply to a refactor that changes nothing. The honest pair is
equivalence and bite, and both legs were run against the committed fix, each with a
trap ... EXIT INT TERM, absolute paths, and the mutation proved on disk by blob hash plus an
anchored text control before anything was measured. The pre-fix side is pinned to this
branch's recorded base commit, never to the shared origin/main pointer.

Leg A — equivalence. The new pins were run against the pre-fix GanttView.tsx
(on-disk blob aa4f3229b, controls: pre-fix marker present, BASE_COLUMN_W absent):
10 passed / 10. The behaviour these pins describe is therefore identical before and after,
measured at nine container widths rather than argued.

Leg B — bite. Re-introducing exactly the curve a future reader might "restore"
(effectiveWidth < 640 ? 90 : BASE_COLUMN_W; injected marker counted on disk, blob changed):
4 failed / 10 — the three narrow-tier pins plus the single-distinct-value pin. The pins are
not vacuous.

Both restores were proved by state, not by an exit code: blob equality against the HEAD
blob (5fe7529a4) and an empty git diff HEAD, and the restore is git checkout HEAD -- ...
rather than a bare git checkout -- ..., which reads back from the index the mutation just
polluted. No rebuild step is needed for either leg and none is claimed: the root Vitest config
aliases every @object-ui/* specifier to its src, and the suite imports ./GanttView
relatively, so nothing here resolves through a package's dist.

Test surface

packages/plugin-gantt/src/GanttView.columnWidth-7228.test.tsx — 10 pins, all DOM readings
(the rendered day-column width off the header's unit cells), never computed style. Nine of them
sit on both sides of each retired breakpoint — 320 / 500 / 639 / 640 / 800 / 1023 / 1024 /
1280 / 1920 — and the tenth requires a single distinct value across all nine, so a restored
curve fails here whatever numbers it picks.

This gap was real: every sibling suite that reads a column width opens by forcing the container
to 1280 "so columnWidth=110 (deterministic)", which pins the widest arm alone. Neither
direction of drift — re-curving the width, or moving the floor — had a test that could catch it.

Not measured locally, and why

check:readme-exports and check:sdui-registration-pins both stopped on an unmet
prerequisite
, not on a finding, and each says so in its own verdict: the first reports
the population COLLAPSED -- this run proves nothing with 36 packages unbuilt, the second
prints No console build to weigh ... This is exit 2, not a pass. Both want builds this change
has no reason to produce, and neither is reachable by this diff: index.tsx is untouched, no
ComponentRegistry.register call changes, and no export appears or disappears. Recorded as NOT
MEASURED rather than as a pass or a failure. CI runs the full farm regardless.

Release impact

None, so the changeset carries empty frontmatter and no package bump — behaviour is
identical at every input; what changes is the shape of the code and its comment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC


Generated by Claude Code

…ead breakpoint table (objectui#7228)

`columnWidthForContainer(width)` branched on the container width three ways and
returned 110 from all three arms, so its parameter was read only to be compared
against thresholds nothing acted on. The shape is not neutral: the two siblings
directly beneath it, `taskListWidthForContainer` and `showStartEndColumns`,
branch on the same 640/1024 breakpoints and really do vary, so the dead table
read as a live responsive policy — a reader reasonably concluded the gantt
narrows its columns in small embeds. It does not.

History settles what the arms were for, so this is a collapse and not a
restoration. The function was born a real curve (35/50/60 off
`window.innerWidth`), kept it through the rename to a container-derived width,
and was bumped to 44/64/80 inside objectui#1870 — then a later commit of that
same PR, titled "floor timeline columns at 110px so day/week/month stay
readable", deliberately replaced the whole curve with one floor. The comment it
added names the value's provenance ("user-specified minimum") and why flatness
costs nothing at the wide end. The branching was leftover shape, not an
unfinished table.

The arms are gone and the value all three returned is now the module constant
`BASE_COLUMN_W`, documented as the floor it is: `columnWidth` resolves to
`columnWidthOverride ?? fitColumnWidth ?? BASE_COLUMN_W` and the fit-stretch
yields a value only when it is strictly greater. That matches how objectui#7420
hoisted the task-list geometry in this file — fixed px values become named
module constants, helpers stay functions only where they vary with the
container.

Behaviour is identical at every input; the changeset carries no package bump.
Ten pins now hold it on both sides of each retired breakpoint (320/500/639/640/
800/1023/1024/1280/1920) plus one requiring a single distinct value across all
of them. Nothing pinned this before: every sibling suite that reads a column
width first forces the container to 1280 "so columnWidth=110 (deterministic)",
pinning the widest arm alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3182.7 KB 3191.4 KB
Main entry chunk (gzip) 143.2 KB 350 KB
Entry file index-C8NK2wXP.js
Status PASS

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 516.21KB 117.82KB
core (index.js) 6.12KB 2.42KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 180.00KB 50.20KB
fields (index.js) 242.40KB 61.26KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.98KB 10.98KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.55KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 48.09KB 13.34KB
plugin-charts (index.js) 70.92KB 19.75KB
plugin-chatbot (index.js) 196.19KB 46.43KB
plugin-dashboard (index.js) 132.89KB 34.68KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 250.93KB 64.09KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 132.87KB 32.66KB
plugin-gantt (index.js) 167.40KB 41.05KB
plugin-grid (index.js) 210.75KB 56.95KB
plugin-kanban (index.js) 52.71KB 14.55KB
plugin-list (index.js) 113.28KB 27.59KB
plugin-map (index.js) 20.55KB 6.80KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.57KB 11.96KB
plugin-timeline (index.js) 30.84KB 8.85KB
plugin-tree (index.js) 9.38KB 3.22KB
plugin-view (index.js) 85.24KB 20.94KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.58KB 2.23KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants