@lukstei/util-review-ui
Summary
Source-only library shared by the Git review plugin: file list, code and diff views, review card, selection quoting, and the review schemas and types. It has no Cordis entry and no bundle. Its only consumer is @lukstei/dsh-client-review-git.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
Install @lukstei/util-review-ui and import from the package exports:
| Import |
Content |
@lukstei/util-review-ui/types |
Git review data contracts (ReviewScope, ReviewTarget, GitSnapshot, GitDiffView, GitRepository, ...), COMMIT_PAGE_SIZE (50), MAX_BRANCH_AGE_MS (7 days) |
@lukstei/util-review-ui/review |
Zod schemas (reviewTargetSchema, branchReviewScopeSchema, snapshotSchema), GIT_REVIEW_TOOL (git_review_present), branchLabel, shortSha, commentLines |
@lukstei/util-review-ui/client/* |
React components and hooks from src/client/ |
@lukstei/util-review-ui/pane-css |
Build plugin that inlines GitDiffPane.module.css |
Client modules: FileList, FileReview, CodeFileView, ReviewCard, useLazyFile, useSelectionQuote, quote (formatQuoteContent, quoteToComposer), diff (createUnifiedDiff), relativeTime.
Client bundles that use the components must register the exported paneCss plugin in their build, so the scoped CSS module ships inside the single DSH plugin script. The bundle of @lukstei/dsh-client-review-git does this.
Plugin dependencies
No plugin dependencies. Library; not mounted, no inject.
Used by (code imports): dsh-client-review-git, dsh-client-split-view.
Understand the implementation
- src/types.ts: plain TypeScript contracts for host Git reads and sidebar rendering.
- src/review.ts: schemas and formatting helpers.
- scripts/pane-css.ts: build plugin that compiles the CSS module with
lightningcss and exports cssText plus scoped class names.
- src/client/: components and hooks.
useLazyFile loads a file when expanded and aborts stale requests. useSelectionQuote turns a code selection into a quote payload.
Persisted state: none. Runtime deps: @deepseek-ai/dsh-typert-protocol, zod; UI primitives come from @deepseek-ai/dsh-client-ui-primitives at the consumer.
Tests: specs beside sources (diff.spec.ts, quote.spec.ts, ReviewCard.spec.tsx, useSelectionQuote.spec.tsx).
Further Exploration
@lukstei/dsh-client-review-git: the consumer.
Model Experience
No model-visible surface. This package adds no tools, prompt text, or context to the model.
Known Limitations and Deferred Work
None.
Dev Note
pnpm run verify runs Biome, typecheck and tests. There is no build step.