Conversation
Analyze context window usage per target, showing always-loaded (description) vs on-demand (body) token costs. - Single-pass discovery with frontmatter-aware char/token counting - Per-target filtering (include/exclude/symlink mode) - Unified output when all targets have identical skills - Verbose mode shows top 10 largest descriptions - Project mode (-p) support - JSON output (--json) - Integration tests
Use SplitButton dropdown for the update action, moving the Force option into a dropdown menu item with confirmation step. This aligns the Update page with the Sync and Extras page patterns.
Add a search input with sticky positioning to filter the update list when many skills have updates. Select All now operates on filtered results only, and uses a shared toggleAll helper with Set-based lookup.
- Fix nil pointer panic when WindowSizeMsg arrives before data loaded - Fix TestAnalyze_Verbose: create 12 skills to match analyzeTopN=10 - Unify left panel with shared renderPrefixRow (▌ prefix bar style) - Right-align token counts in skill list rows - Pre-compute colored dots to avoid per-render lipgloss allocations - Add category tab bar at top for future analysis categories - Improve target bar separator (│ → ·) and footer spacing - Extract renderFooter to eliminate viewSplit/viewVertical duplication - Add analyze command reference page and sidebar/index entries
Targets with no include/exclude filters share the same skill set, so showing them individually is redundant and causes layout overflow. Group targets by (SkillCount, AlwaysLoaded, OnDemandMax) into analyzeTargetGroup entries. Title shows "N targets" instead of listing all names. Target bar is hidden when only one group exists.
Populate LintIssues during skill discovery (collectContext path) and propagate them through analyzeSkillEntry so JSON output includes lint findings per skill.
- Eliminate double YAML parse: extend calcContextFromContent to return name, remove parseFrontmatterName helper - Pre-compute lint icons (lintIconError/lintIconWarning) to avoid lipgloss.NewStyle() allocation per render frame - Use tc.Red/tc.Yellow for Quality section icons (consistency) - Extract check type string constants (checkFieldEmpty, etc.) - Panic on embedded rule load failure instead of silent nil return - Rename "Targets: all" to "Restricted to" (only shown when set) - Fix struct field alignment (gofmt)
Expose per-target context-window budget analysis via the REST API. The handler discovers source skills with context metadata (desc/body char counts, lint issues), applies each target's filter/mode rules, and returns aggregated always-loaded vs on-demand token estimates.
Wire up frontend infrastructure for the Analyze page: - Add AnalyzeResponse/AnalyzeTarget/AnalyzeSkill/AnalyzeLintIssue types - Add api.analyze() method calling GET /analyze - Register /analyze route with lazy-loaded AnalyzePage - Add Analyze nav item (BarChart3 icon) in SECURITY & MAINTENANCE group - Create placeholder AnalyzePage component
Replace placeholder with complete analyze dashboard: - PageHeader with BarChart3 icon, dynamic subtitle, refresh button - Loading/error/empty states using shared components - Target group merging with SegmentedControl for multi-group switching - 4 summary cards (skills, always-loaded, on-demand, quality issues) - Top-10 heaviest skills horizontal bar chart with P25/P75 coloring - Lint issues summary panel with clickable rule filtering - Full skill table with sortable columns, search, lint filter badge - Expandable rows showing token breakdown, metadata, and description
…dals Redesign AnalyzePage with improved visual hierarchy, accessible colors, and consistent styling. Unify all dialog/modal components to use a shared DialogShell with border-2 border-pencil + hard-offset shadow pattern, removing Card wrappers that caused inconsistent appearance. AnalyzePage improvements: - Summary cards with Audit-style icon blocks and semantic colors - Bar chart uses info blue (not red) with uniform opacity - Skill detail shown in dialog instead of inline expand - Table matches Skills page table view (dashed borders, pagination) - Quality Issues section with readable rule names and proportion bars - Help dialog explaining page purpose and token calculation - All colors use CSS variables for dark mode compatibility Dialog unification (11 files): - DialogShell: add bg-surface, border-2 border-pencil, padding prop, createPortal to body, CSS shadow rules - Migrate KeyboardShortcutsModal from inline to DialogShell - Remove Card wrappers from ConfirmDialog, SkillPickerModal, HubManagerModal, SyncPreviewModal, UpdateDialog, ExtrasPage - FileViewerModal: padding=none with manual header padding
AnalyzePage: - Add "View Skill Detail" link in skill dialog for quick navigation - Simplify subtitle (remove redundant useMemo with identical branches) - Replace prevFiltered anti-pattern with useEffect for pagination reset - Remove unused border/bg fields from summary card data SkillDetailPage: - Show estimated token count in stats bar with desc/body breakdown - Hover tooltip shows full breakdown (~4 chars/token estimate)
Use percentage-based positioning (left: 50% + translateX) instead of fixed pixel offsets (right: 18px / left: 22px) so pins stay centered regardless of card width. Add nth-child variation at 40%/60%.
Add CHANGELOG and website changelog entries for v0.18.0 covering the new analyze command, skill quality lint, TUI, Web UI Analyze page, and Update page improvements. Update analyze.md with lint rules table, quality section, and updated JSON output example. Add analyze to built-in skill description and Quick Lookup table. Bump skill version to v0.18.0. Fix TUI list title to show skill count in stats line instead of title, and truncate long skill names to keep token count visible.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant new 'analyze' command and corresponding web UI page, empowering users to optimize their AI context window usage and improve skill quality through automated linting. It also refines the user experience in the web UI with updated components and consistent styling across various dialogs, making the application more robust and user-friendly. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a major new analyze command and corresponding web UI page, allowing users to analyze context window token usage for their skills and view skill quality linting issues. The analyze command provides both an interactive TUI and JSON output. The underlying internal/sync package was extended to calculate skill context and run lint checks. Additionally, several UI components were refactored to use a unified DialogShell for consistent styling, and the Update page received improvements like a sticky search filter and SplitButton actions. Feedback indicates that the yaml.Unmarshal error in internal/sync/context.go should be handled to prevent silent failures, the help text for the --verbose flag in cmd/skillshare/analyze.go should be updated to reflect the correct 'Top 10 descriptions' count, and the analysis data building logic in internal/server/handler_analyze.go should be refactored to reuse code from cmd/skillshare/analyze.go to avoid duplication.
- Surface YAML parse errors from calcContextFromContent as a new "malformed-frontmatter" lint issue instead of silently ignoring them - Fix help text to say "Top 10" (was "Top 5") matching actual constant - Shorten TUI list title to target name only; move skill count to stats line so the header no longer wraps on narrow terminals - Truncate long skill names in TUI to keep token counts visible - Change "All Skills" icon block to green (matches Skills summary card)
Discussion: #99
TL;DR
skillshare analyze— new command to measure context window token usage per target and lint skill quality