Skip to content

Paginate skill detail content - #991

Merged
brsbl merged 2 commits into
mainfrom
bb/skill-detail-pagination-thr_cxz5rwzns3
Aug 4, 2026
Merged

Paginate skill detail content#991
brsbl merged 2 commits into
mainfrom
bb/skill-detail-pagination-thr_cxz5rwzns3

Conversation

@brsbl

@brsbl brsbl commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • constrain skill detail content to a viewport-relative viewer
  • reuse the shared extension pagination control for previous/next navigation
  • recalculate pages across content reflow, window resizing, and native full-screen transitions

Verification

  • pnpm exec turbo run test --filter=@bb/app -- --run src/components/tools/detail-page-recipes.test.tsx src/components/ui/resource-pagination.test.tsx (41 passed)
  • pnpm exec turbo run typecheck --filter=@bb/app
  • git diff --check
  • branch dev app: verified first/last pages, narrow window reflow, and native full-screen reflow; focused test covers short content without pagination

Stack

Layer 1, based on main. Follow-on fixes should branch from this head and target this branch.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

I am the SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and end-to-end behavior.

The stack contains only #991, “Paginate skill detail content.” I found no draft or unauthorized pull request to skip.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

Security phase complete.

I found no security issue. This change adds no trust boundary, injection sink, network call, or data exposure. React receives only numeric values in the new transform style.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

Code quality phase complete.

I found an actionable focus and scroll-state risk. Content outside the visible page stays active. Focus or find-in-page can move the hidden scroll container without changing the pagination state.

The code also repeats viewport measurement logic from the shared pagination module. The browser phase will verify the user-visible behavior.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

Performance phase complete.

I found no severe performance regression. The main concern is the React key at SkillDetailView.tsx:344. It copies the full file content and remounts the complete preview after any content change.

The pagination clips one complete document. It does not reduce parsing or DOM memory. The resize path also performs redundant measurements.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

End-to-end phase complete.

All 41 focused tests passed. The Next control and viewport reflow worked. The browser test confirmed the hidden-scroll defect.

Focusing an off-page link changed scrollTop from 0 to 2073. The control still showed page 1 of 26.

<div
ref={setViewport}
data-skill-content-viewport
className="max-h-[60dvh] overflow-hidden"

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.

🚨 slopcop/review — Hidden content can scroll without pagination state.

overflow-hidden remains a scroll container. In the browser test, an off-page link received focus. The viewport scrollTop changed from 0 to 2073.

The navigation still showed “Page 1 of 26.” This leaves the visual position and page state inconsistent.

Use overflow-clip, or prevent focus and scroll outside the visible page. Add a browser test for off-page focus.

@SawyerHood SawyerHood left a comment

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.

🚨 SLOP COP 🚨 · review

Review complete for the one-pull-request stack: #991.

I found no security issue. The change adds no trust boundary, injection sink, dependency, or protocol change.

I found one defect that needs a fix before merge. The new overflow-hidden viewport remains programmatically scrollable. Off-page links also remain focusable.

The browser test focused one hidden link. The viewport scrollTop changed from 0 to 2073. The navigation still showed page 1 of 26.

Use overflow-clip, or prevent focus and scroll outside the visible page. Add a browser test for this case.

The performance review found no severe regression. The full-content React key creates avoidable work and remounts the preview after content changes.

The code repeats viewport measurement logic from the shared pagination module. A shared measurement hook could remove this duplicate code.

Verification completed:

  • 41 focused tests passed.
  • Normal Next navigation worked.
  • Window reflow changed 26 pages to 34 pages and kept page 2 selected.
  • The browser test reproduced the focus defect.

I used a comment review. I did not approve or request changes.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

I am SlopCop. I am reviewing this stack under the review rule.

The stack contains these pull requests, from bottom to top:

I will run security, code quality and architecture, performance, and one end-to-end phase on top PR #1001.

I skipped no pull requests.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

Security phase complete.

I found no security issues in the nine pull requests.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

Performance phase complete.

The phase raised one candidate concern in #991. The final review gate will check whether the pull request caused a regression.

@SawyerHood

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

Code-quality and architecture phase complete.

The phase raised candidate findings in #991, #994, #997, and #1001. The final review gate will check each finding.

<div
ref={setViewport}
data-skill-content-viewport
className="max-h-[60dvh] overflow-hidden"

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.

🚨 slopcop/review — Hidden pages remain in the focus order and the accessibility tree.

overflow-hidden and the pixel transform only move one full FilePreview. Off-page links remain focusable, and page boundaries can split content.

Use normal scrolling or render only the active semantic page. Add a browser test with links on later pages.

@SawyerHood SawyerHood left a comment

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.

🚨 SLOP COP 🚨 · review

Review complete.

I found one medium accessibility issue. Hidden pages remain available to keyboard users and screen readers.

The performance candidate is not a regression. The old code already parsed and rendered the full file.

The security phase found no issues. The final GPT-5.6 gate confirmed this finding.

The app typecheck passed. GitHub checks passed. Host load blocked the focused local test and browser route.

I used a comment-only review. I did not approve or request changes.

## Summary
- reduce capability names using the established text-xs typography token
- keep scheduled jobs and other shared detail-row consumers unchanged
- add focused regression coverage for capability name styling

## Verification
- pnpm exec turbo run test --filter=@bb/app -- --run
src/components/tools/detail-page-recipes.test.tsx (38 passed)
- pnpm exec turbo run typecheck --filter=@bb/app
- git diff --check
- visually verified Automations and Workflows plugin details in the
branch dev app, including proportional, monospace, and long-description
capability rows

## Stack
Layer 2. Base: bb/skill-detail-pagination-thr_cxz5rwzns3 (PR #991).
@brsbl
brsbl merged commit 4559706 into main Aug 4, 2026
10 checks passed
@brsbl
brsbl deleted the bb/skill-detail-pagination-thr_cxz5rwzns3 branch August 4, 2026 23:47
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.

2 participants