codexmate icon indicating copy to clipboard operation
codexmate copied to clipboard

fix(docs): default registry to npmmirror and fix command display

Open ymkiux opened this issue 5 months ago • 1 comments

Summary

  • Change default registry preset from official to npmmirror
  • Remove official registry button from docs panel
  • Add max-width constraint to command display to keep copy button visible
  • Update status strip fallback to show npmmirror

Verification

  • All unit tests pass
  • Lint passes

Summary by CodeRabbit

  • Changes

    • Updated the default package registry preset to npmmirror across the web UI.
    • When no preview value is set, the registry status and docs “current registry” now display npmmirror.
    • Removed the official/default registry option from the docs panel selections.
  • Style

    • Refined documentation panel command box layout and the positioning of the copy button for better spacing and responsive behavior.

ymkiux avatar Jun 16 '26 14:06 ymkiux

Review Change Stack

[!CAUTION]

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6640ceaf-8116-4e60-9d05-15f595d9d2e1

📥 Commits

Reviewing files that changed from the base of the PR and between 5ff920c0e0e9c8b91829f827ba701583a2eb0214 and 9a4afa789a5425a02f5810781e56ffe2086433b6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • web-ui/partials/index/panel-sessions.html
  • web-ui/res/web-ui-render.precompiled.js

📝 Walkthrough

Walkthrough

The default npm install registry preset is changed from 'default' (official) to 'npmmirror' in the Vue app state, templates, and precompiled render. The official/default preset button is removed from the docs panel preset selector. All fallback display labels switch from the i18n common.defaultOfficial string to the literal 'npmmirror'. The docs command box styling is restructured to use multi-line text wrapping with constrained overflow behavior instead of horizontal scrolling. The agents/prompts editor toolbar buttons are refactored to icon-only SVG rendering with tooltip titles and per-button disabled state logic. The agents export feature is updated to generate markdown files with prefixed, timestamped filenames. Session preview button icons are refreshed and the package version is incremented to 0.0.52.

Changes

Registry Default, Docs Layout, and Agents Editor Updates

Layer / File(s) Summary
npmmirror as default preset: state, templates, and precompiled render
web-ui/app.js, web-ui/partials/index/panel-docs.html, web-ui/partials/index/layout-header.html, web-ui/res/web-ui-render.precompiled.js
installRegistryPreset default value changed from 'default' to 'npmmirror' in app state. The official/default preset button is removed from the docs panel preset selector. All fallback display labels for installRegistryPreview changed from t('common.defaultOfficial') to the literal 'npmmirror' in both template partials and the precompiled render.
Docs panel command box text wrapping and responsive overflow
web-ui/styles/docs-panel.css
.docs-command-box gains overflow: hidden and max-width: 100% to constrain content spillover. The .install-command text area changes from single-line, horizontally scrollable layout (white-space: nowrap, overflow-x: auto) to multi-line wrapping with white-space: normal, word-break: break-all, and overflow-wrap: break-word. Mobile responsive adjustments (max-width: 720px) remove previous layout overrides and replace them with overflow: hidden applied to .docs-install-row and .docs-command-row.
Agents editor toolbar icon-only UI with tooltips and disabled states
web-ui/partials/index/panel-prompts.html, web-ui/res/web-ui-render.precompiled.js
Agents toolbar buttons (export, copy, paste, cancel, back, apply/save/preview) are refactored to use SVG icons instead of localized text labels with tooltip :title attributes for accessibility. The apply button's displayed content switches from state-dependent text to conditional icons. Disabled state logic is updated to include explicit per-button conditions: export/copy/paste tied to agentsLoading/agentsSaving/agentsDiffVisible; workflow actions tied to agentsSaving/agentsDiffLoading.
Agents export with markdown format and timestamped filenames
web-ui/modules/app.methods.session-actions.mjs
The exportAgentsContent() method is updated to generate markdown (.md) filenames with a prefix based on this.promptsSubTab (claude- or agents-), followed by a YYYYMMDD-HHMMSS timestamp. The file download MIME type is changed from text/plain;charset=utf-8 to text/markdown;charset=utf-8.
Session preview button icons and release version update
web-ui/partials/index/panel-sessions.html, web-ui/res/web-ui-render.precompiled.js, package.json
SVG icon contents for the "copy session link" and "copy session path" buttons are replaced in both source template and precompiled render. Package version is incremented from 0.0.51 to 0.0.52.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 Hop hop, the mirror is set, No more "official" to fret! npmmirror leads the way, Buttons wear icons, not text display. Words now wrap, exports timestamp with pride— A tidy layout and features worldwide! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: setting npmmirror as default registry and fixing command display issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • [ ] Create stacked PR
  • [ ] Commit on current branch
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Commit unit tests in branch feat/docs-registry-default-npmmirror

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.43.0)
web-ui/res/web-ui-render.precompiled.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jun 16 '26 14:06 coderabbitai[bot]

[!CAUTION] Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

coderabbitai[bot] avatar Jun 17 '26 15:06 coderabbitai[bot]