Skip to content

Issue #2023 - EGI: dynamic columns resizing#2752

Merged
01es merged 18 commits into
developfrom
Issue-#2023
Jul 8, 2026
Merged

Issue #2023 - EGI: dynamic columns resizing#2752
01es merged 18 commits into
developfrom
Issue-#2023

Conversation

@jhou-pro

@jhou-pro jhou-pro commented May 28, 2026

Copy link
Copy Markdown
Member

Resolve #2023

To be completed by the pull request creator

This section should be completed with reference to section Preparing PR of the Code and PR reviews wiki page.

  • Create the pull request as a draft by tapping the dropdown arrow on the 'Create pull request' button under the pull request description (below the text box where this description is being edited) and changing the default Create pull request to Draft pull request.
    Or, if the pull request has already been created, convert it to draft by tapping the "Convert to draft" link beneath the "Reviewers" section.

  • A self-review of all changes has been completed, and the changes are in sync with the issue requirements.

  • Changes to the requirements have been reflected in the issue description.

  • Any "leftovers" such as sysouts, printing of stack traces, and any other "temporary" code, have been removed.

  • Minor refactorings, such as renamings, extraction of constants, etc., have been addressed.

  • Developer documentation (e.g., comments, Javadoc), have been provided where required.

  • New Java tests have been written or existing tests adjusted, if required, to cover the new functionality.

  • All existing and new Java tests pass successfully by running them with Maven.

  • All existing and new Web tests pass successfully.

  • Changes have been inspected for possible NPE situations, and the changes are sufficiently defensive.

  • The correct base branch has been selected for these changes to be merged into.

  • The latest changes from the base branch have already been merged into this feature branch (and tested).

  • Added a change overview to the issue description or as a wiki page, referenced in the issue description.
    Some issues might be very descriptive and serve in place of a wiki page.
    In such cases consider adding label Wiki like to the issue.

  • Changes subject to performance considerations have been evaluated, and tested against production-size data if applicable.

  • This pull request does not contain significant changes, and at least one appropriate reviewer has been selected.

  • The In progress label has been removed from the issue.

  • The Pull request label has been added to the issue.

  • The pull request has been made ready for review by tapping the "Ready for review" button below the list of commits on the pull request page.

To be completed by the pull request reviewer

This section should be completed with reference to section Performing PR review of the Code and PR reviews wiki page.

  • The In progress label has been added to the pull request in GitHub.

  • The issue requirements have been read and understood (along with any relevant emails and/or Slack messages).

  • The correct base branch is specified, and that base branch is up-to-date in the local source.

  • The issue branch has been checked out locally, and had the base branch merged into it.

  • All automated tests pass successfully.

  • Ensure the implementation satisfies the functional requirements.

  • Ensure that code changes are secure and align with the established coding practices, including code formatting and naming conventions.

  • Ensure that code changes are documented and covered with automated tests as applicable.

  • Ensure that code changes are well-suited for informal reasoning.

  • Ensure that changes are documented for the end-user (a software engineer in the case of TG, or an application user in the case of TG-based applications).

  • The issue or issues addressed by the pull request are associated with the relevant release milestone.

To be completed by the pull request reviewer once the changes have been reviewed and accepted

  • The changes have been merged into the base branch (unless there is a specific request not to do so, e.g., they are to be released to SIT).

  • The issue branch has been deleted (unless the changes have not been merged - see above, or there is a specific request not to do so).

  • The In progress label has been removed from the pull request.

  • The Pull request label has been removed from the issue.

jhou-pro added 5 commits May 23, 2026 20:29
Each persisted dynamic column override now carries a `lastSeen` millis: it is seeded on resize, bumped on every centre run that emits at least one dynamic column, and included into the centre diff alongside `WIDTH` / `GROW_FACTOR` (new `DYNAMIC_LAST_SEEN` meta-value type). `CriteriaResource.createDynamicProperties` runs the sweep at the single point that knows which dynamic columns are present — it refreshes `lastSeen` for the keys actually applied as overrides and removes any other persisted entry (including orphan overrides whose column is no longer emitted), whose timestamp is more than 30 days old. Centres without dynamic columns pay no extra cost, and centres with dynamic columns issue no persistence action, unless there is something to bump or remove.
@jhou-pro jhou-pro requested review from 01es and oleh-maikovych May 28, 2026 20:27
jhou-pro added 10 commits May 28, 2026 23:46
…cted by dynamic ones.

Dynamic columns are always in `this.columns` list.
Dynamic columns receive their persisted width and growFactor through the `dynamicColumns.*Columns` per-column emission and the `[[item.width]]` / `[[item.growFactor]]` bindings on `tg-property-column`, so re-emitting them through `columnWidths` and re-applying via `adjustColumnWidths` was duplicative.

The duplicated path also carried a corruption risk: when only growFactor had been persisted for a dynamic key, `createColumnWidths` synthesised `newWidth: 0`, which the client would apply on top of the correct width and `_calcColumnHeaderStyle` would render as `display: none`, hiding the column.
  Restored `CentreResourceUtils.createColumnWidths` to the upstream `checkedProperties`-only collector and `tg-entity-grid-inspector.adjustColumnWidths` to the upstream `filter(!collectionalProperty)` form.
…ynamic columns.

This is to increase comprehension of how width / minWidth works and to prevent further potential problems.
@jhou-pro jhou-pro requested a review from homedirectory May 30, 2026 14:02
@jhou-pro jhou-pro marked this pull request as ready for review May 30, 2026 14:14
Previously the maintenance sweep re-stamped lastSeen for every applied dynamic-column override on every emission, so each run and each page navigation of a centre with a resized dynamic column rewrote all three surrogate configurations (FRESH, PREVIOUSLY_RUN, SAVED) — 3 loads plus 3 writes of EntityCentreConfig per request.

A used key is now re-stamped only when its recorded lastSeen is missing (stamping still heals legacy width-only entries) or at least DYNAMIC_LAST_SEEN_BUMP_INTERVAL_MILLIS (one day) old; requests within the interval cost no persistence actions at all.

Day granularity is lossless for the eviction contract: eviction fires only after strictly more than DYNAMIC_ENTRY_EVICTION_DAYS whole days since the recorded lastSeen, so even with lastSeen lagging actual use by up to a day, at least 30 days of actual non-use remain guaranteed before an entry is discarded.

Also fixed a stale Javadoc signature reference on DYNAMIC_ENTRY_EVICTION_DAYS and extended RefreshAndEvictDynamicEntriesTest with throttle and healing scenarios.
@01es 01es removed the In progress label Jul 8, 2026
@01es 01es merged commit 2e9daea into develop Jul 8, 2026
3 checks passed
@01es 01es deleted the Issue-#2023 branch July 8, 2026 08:22
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.

EGI: dynamic columns resizing

3 participants