Repository navigation
refactor(plugins): share source-root display formatting - #148646
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 8:30 PM ET / September 15, 2026, 00:30 UTC. ClawSweeper reviewWhat this changesShares plugin source-path formatting across bundled, workspace, and global origins while preserving displayed labels and adding fallback coverage. Merge readiness✅ Ready for maintainer review The requested cleanup remains absent from current main, and the refactor preserves the existing formatting contract. No actionable defect was found; this member-authored PR should remain open for normal landing. Priority: P3 Review scores
Verification
How this fits togetherThe plugin inventory command passes source paths, origins, and known installation roots to this formatter. It returns compact table text and the root labels used in the command’s legend. flowchart TD
A[Plugin inventory] --> C[Source path formatter]
B[Known installation roots] --> C
C --> D{Path beneath matching root?}
D -->|Yes| E[Labeled relative path]
D -->|No| F[Home shortening and truncation]
E --> G[Plugin table and root legend]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -10, Tests +21. Total +11 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one origin-to-root formatting branch within the existing formatter, preserving all current table and fallback output. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes duplication rather than reporting a runtime defect; source inspection supports equivalent behavior for all four defined origins. Is this the best way to solve the issue? Yes. Selecting the existing root once removes repeated formatting logic without adding another owner, changing interfaces, or altering discovery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f0344c1cb9dc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '0945dabbe487213e95e84a72ad1aae3659e0e000': (115 commits) fix: omit automation service aliases from squash coauthors (#148883) test: restore services typecheck shard headroom (#148885) perf(trajectory): avoid native probes for truncation records (#148870) improve(gateway): load cron only when reload requests it (#143500) fix: resolve issue #146088 — [Bug]: The most recent Linux AppImage does not ship with the correct versions of libs needed to run (#148174) refactor(theme): share nonvirtual ANSI color lookup (#148717) perf(gateway): scope exact session row topology reads (#148836) improve(memory): reduce vector replacement overhead (#148201) fix(i18n): keep HTTP headers out of native translations (#147119) refactor(plugins): share source-root display formatting (#148646) fix(cron): reject blank script paths before mutations (#148787) refactor(config): share audit positional scanning (#148643) fix(test): restore infrastructure typecheck shard headroom (#148861) fix(release): harden package validation fallbacks (#148729) refactor(config): share leaf and descendant unset pruning (#148216) test: reuse prepared runtime for pristine preflight (#148858) fix(ui): settle global model drafts across agent switches (#148843) fix(queue): avoid repeated scans when cancelling backlogs (#148754) fix(logging): orphaned \\\\?\\ path markers corrupt redacted Windows diagnostics (#147542) refactor(hooks): share optional reply metadata projection (#148641) ...
What Problem This Solves
This maintainer-requested refactor is part of the approved duplication and complexity reduction deliverable. Plugin source table formatting repeats the same relative-path lookup and labelled return for bundled, workspace and global origins.
User Impact
No intended output change. Bundled sources still use
stock:, workspace/global sources retain their labels, and configured sources use the existing home-shortened fallback. Missing or empty roots, exact-root paths and paths outside the matching root retain that fallback. The existing 48-character, UTF-16-safe middle truncation is unchanged.Why This Change Was Made
Select the existing root key once and share the relative-path formatting branch. Root discovery, lexical containment, slash normalization and verbose/JSON output stay unchanged. The home-shortening fallback and both home-boundary regression cases are preserved.
Production: -10 lines. Tests: +21 lines. This mechanical refactor needs no changelog entry.
Evidence
8d384baa5b2222d5fb3819795d994d81941b018e.ff73f7872550e4712860212d65ae2bc687535c81contains the exact reviewed owner and test bytes.This is formatter fixture evidence. No live plugins-list session, Windows execution or bundle-performance result is claimed.