feat(profile): safely edit non-secret account labels - #251
Conversation
📝 WalkthroughWalkthroughAdds guarded profile description set/clear support for CLI and Console workflows, including validation, auditing, recovery, persistence, UI/API wiring, documentation, and integration coverage. ChangesProfile description editing
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant ConsoleDashboard
participant ConsoleServer
participant ConsoleApplicationService
participant ProfileDescriptionChange
participant ConfigFile
ConsoleDashboard->>ConsoleServer: POST /api/v1/profiles/description
ConsoleServer->>ConsoleApplicationService: validate and dispatch request
ConsoleApplicationService->>ProfileDescriptionChange: set or clear profile description
ProfileDescriptionChange->>ConfigFile: apply guarded replacement
ConfigFile-->>ConsoleDashboard: changed/write/actions report
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/console/console-assets.ts`:
- Around line 817-841: Update renderProfileDescriptionEditor to capture the
current profile.value before setOptions(profile, names), then restore that
selection after rebuilding the options when it still exists; otherwise retain
the normal default selection behavior. Ensure updateDescription runs after
restoration so the input reflects the preserved profile.
In `@src/console/console-server.ts`:
- Around line 71-88: Loosen profileDescriptionTextSchema to perform only basic
string validation and a protective maximum-size check, removing the trim and
control-character refine so invalid formatting reaches
setProfileDescription/runProfileDescriptionChange. Preserve the existing
description/clearDescription validation in profileDescriptionChangeSchema and
let the engine’s PROFILE_DESCRIPTION_INPUT_INVALID handling provide the specific
user-facing message.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d5c8d119-5988-4124-ad32-41d3638e93b2
📒 Files selected for processing (20)
CHANGELOG.mdREADME.mddocs/cli.mdsrc/cli/exit-codes.tssrc/cli/main.tssrc/cli/parse.tssrc/console/console-application-service.tssrc/console/console-assets.tssrc/console/console-dashboard-application-service.tssrc/console/console-server.tssrc/setup/profile-description-onboarding.tssrc/utils/errors.tstests/cli-exit-codes.test.tstests/cli-parse.test.tstests/console-application-service.test.tstests/console-dashboard-application-service.test.tstests/console-server.test.tstests/package-contract.test.tstests/profile-description-onboarding.test.tstests/readme-product-contract.test.ts
Part of #204.
Summary
Validation
npm run typechecknpm run lintnpm run buildnpm run smoke:clinpm run check:packnpm run test:package(24/24, real installed tarball)npm run test:coveragewas attempted twice locally. It hit existing timing-sensitive failures under severe macOS Storage Management CPU saturation; no feature source, test assertion, or timeout was changed. The exact cancellation case passed in isolation. Evidence is recorded on #122; current-head CI remains the required full-suite gate.Summary by CodeRabbit
New Features
profile set-descriptionCLI support with validation, reviewable results, and clear-label functionality.Bug Fixes
Documentation