Skip to content

refactor(web): clean up unused frontend store fields and worker remnants - #913

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-wuzxnlovuupu
Aug 27, 2026
Merged

kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-wuzxnlovuupu

Conversation

@kyasbal

@kyasbal kyasbal commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Remove obsolete fields, methods, and types in the frontend store that were rendered redundant after moving search and body inspection handling to the backend:

  • Remove timeline severities buffer allocation, memory layout, and the $O(T \times (R + E))$ initialization loop in TimelineStore.
  • Remove hasSeverity() from Timeline and _hasSeverities() from TimelineStore.
  • Remove SharedData interfaces, fromSharedData(), getSharedData(), mapMetadataViews(), and readOnly flags across LogStore, TimelineStore, InternPoolStore, and StyleStore.
  • Remove orphaned worker store files (worker-style-store.ts, worker-types.ts).
  • Update unit tests to reflect the removed methods and classes.

Testing

  • make format-web
  • make lint-web
  • make test-web (all 798 tests pass)
  • make build-web
  • make pre-commit
Remove obsolete fields, methods, and types in the frontend store that were
rendered redundant after moving search and body inspection handling to the
backend:
- Remove timeline severities buffer allocation, memory layout, and the O(T*(R+E)) initialization loop in TimelineStore.
- Remove hasSeverity() from Timeline and _hasSeverities() from TimelineStore.
- Remove SharedData interfaces, fromSharedData(), getSharedData(), mapMetadataViews(), and readOnly flags across LogStore, TimelineStore, InternPoolStore, and StyleStore.
- Remove orphaned worker store files (worker-style-store.ts, worker-types.ts).
- Update unit tests to reflect the removed methods and classes.
@kyasbal kyasbal added the type:refactor Code refactoring without behavioral change label Aug 26, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request removes shared memory and WebWorker-related shared data structures, read-only modes, and their associated tests across several store classes, including InternPoolStore, LogStore, StyleStore, and TimelineStore. Feedback is provided on the InternPoolStore constructor, where an odd initialCapacity could cause a RangeError due to alignment mismatch when creating Uint32Array views; a code suggestion is included to dynamically align the capacity to an even number.

…alization

- Add align() memory utility to ensure TypedArray offsets meet alignment requirements
- Unify TimelineStore, LogStore, and InternPoolStore initialization into static initialize() factories
- Remove create(), obsolete initialCapacity, and unused bufferSabs
- Rename metadataSab to metadataBuffer across stores
- Update InspectionDataBuilder, mocks, tests, and stories to use the static initialize factories
@kyasbal
kyasbal merged commit 081da2c into GoogleCloudPlatform:main Aug 27, 2026
16 checks passed
@kyasbal
kyasbal deleted the push-wuzxnlovuupu branch August 27, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:refactor Code refactoring without behavioral change

1 participant