Skip to content

notify: report hidden asset count in overflow suffix - #170

Merged
BaaRai merged 1 commit into
mainfrom
fix/notify-overflow-count
Nov 10, 2026
Merged

BaaRai merged 1 commit into
mainfrom
fix/notify-overflow-count

Conversation

@BaaRai

@BaaRai BaaRai commented Nov 10, 2026

Copy link
Copy Markdown
Owner

What

The "and N more" suffix of the notification asset list showed the total number of assets instead of the number left out. With 5 assets and a limit of 2 it read "a, b and 5 more"; it now reads "a, b and 3 more". This is the bug behind issue #168, fixed on its own.

  • notify/render.go: the suffix uses len(assets) - limit. The behaviour is unchanged when the list fits within the limit.
  • notify/render_test.go: the existing assertion that pinned the old value now expects the hidden count, and a second case covers 8 assets with a limit of 3 ("and 5 more").

Not included

Configurable summary and asset limits, the zero-means-no-truncation option and the Feishu size guard: they follow in a separate change, per the plan agreed on #168.

Verification

  • gofmt clean on the CR-stripped content; go build ./... and go vet ./notify/: pass.
  • go test ./notify/: pass (no Postgres needed).
  • The new assertion was not re-run against the old code to confirm it fails there.

Do not merge before go, shell and web are green on the exact head SHA.

assetLine appended "and N more" with N = len(assets), the total, instead
of the number of assets left out. With 5 assets and a limit of 2 it read
"a, b and 5 more"; it now reads "a, b and 3 more".

Fix the test that pinned the old value and add an 8-assets/limit-3 case.
@BaaRai
BaaRai merged commit cf0b0c1 into main Nov 10, 2026
4 checks passed
usinfosec pushed a commit to usinfosec/ARTEX that referenced this pull request Nov 17, 2026
左侧资产树的滚动容器靠 height:100% 取高,但外层卡片只给了 max-height
没有确定高度,百分比高度解析失败,资产多时列表撑破卡片或被截断且无法
滚动。改为把高度上限直接放到资产树的原生滚动容器上(overflow-y-auto +
max-h,随窗口自适应),资产少随内容收缩、资产多封顶并出滚动条。

Closes BaaRai#170
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.

1 participant