Skip to content

fix(layers): type column geometry attributes - #10508

Merged
chrisgervang merged 2 commits into
masterfrom
fix/column-layer-lint
Jul 31, 2026
Merged

chrisgervang merged 2 commits into
masterfrom
fix/column-layer-lint

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Give ColumnGeometry a precise internal attributes type that guarantees POSITION and NORMAL
  • Return GeometryAttribute values from column tessellation and declare the generated wireframe topology as line-list
  • Remove the non-null assertions, TypeScript suppression, and ESLint suppression without changing the general luma Geometry contract

Test plan

  • yarn build
  • yarn lint (0 errors; existing repository warnings only)
  • yarn vitest run --project headless test/modules/layers/column-geometry.spec.ts (2 tests)
  • ColumnLayer render cases in the full suite (8 tests)
  • yarn test completed: 1022 passed and 14 skipped; 7 unrelated local failures in LoadingWidget and render-image threshold tests

Note

Low Risk
Typing and explicit topology metadata only; no changes to tessellation math or draw logic beyond documenting wireframe topology on the geometry object.

Overview
ColumnGeometry now declares POSITION and NORMAL as required GeometryAttribute fields via a ColumnGeometryAttributes type and a class-level attributes override, replacing the loose Record<string, BinaryAttribute> tessellation return type.

The constructor passes topology: 'line-list' into the base Geometry (aligned with wireframe rendering), and ColumnLayer._updateGeometry can read those attributes without non-null assertions, @ts-expect-error, or ESLint suppressions.

A spec assertion checks that topology is line-list.

Reviewed by Cursor Bugbot for commit 8e05928. Bugbot is set up for automated code reviews on this repo. Configure here.

@chrisgervang
chrisgervang force-pushed the fix/column-layer-lint branch from c361550 to 9591fb6 Compare July 29, 2026 21:35
@chrisgervang chrisgervang changed the title fix(layers): remove unnecessary non-null assertions in column-layer fix(layers): suppress eslint false positive on column-layer type assertions Jul 29, 2026
@chrisgervang
chrisgervang requested a review from ibgreen July 29, 2026 21:36

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9591fb6. Configure here.

@chrisgervang
chrisgervang force-pushed the fix/column-layer-lint branch from 9591fb6 to 5433415 Compare July 29, 2026 21:39
@coveralls

coveralls commented Jul 29, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 83.117%. remained the same — fix/column-layer-lint into master

@chrisgervang
chrisgervang force-pushed the fix/column-layer-lint branch from 5433415 to ea01dc3 Compare July 30, 2026 00:12
@chrisgervang chrisgervang changed the title fix(layers): suppress eslint false positive on column-layer type assertions fix(layers): type column geometry attributes Jul 30, 2026
const {indices, attributes} = tesselateColumn(props);
super({
...props,
topology: 'line-list',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

removing the existing suppression also revealed the required topology field

};

export default class ColumnGeometry extends Geometry {
declare readonly attributes: ColumnGeometryAttributes;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder why declare needed here? It is very rarely used in our code base.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, I think the LLM was being overly cautious. I changed it to readonly attributes!: ColumnGeometryAttributes; which I see examples of elsewhere.

modules/aggregation-layers/src/grid-layer/grid-cell-layer.ts has

state!: ColumnLayer['state'] & {
  colorTexture: Texture;
};

to narrow the type in a similar way

@chrisgervang
chrisgervang force-pushed the fix/column-layer-lint branch from ea01dc3 to d0f8a92 Compare July 31, 2026 00:32
# Conflicts:
#	modules/layers/src/column-layer/column-layer.ts
@chrisgervang
chrisgervang merged commit 2fe6a2a into master Jul 31, 2026
6 checks passed
@chrisgervang
chrisgervang deleted the fix/column-layer-lint branch July 31, 2026 00:57
@chrisgervang chrisgervang added this to the v9.4 milestone Aug 11, 2026
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.

3 participants