fix(cli): share project-id truncation helper#83
Closed
barry166 wants to merge 1 commit into
Closed
Conversation
status and reset both rendered the same shortened project id with separate\nmagic numbers. Centralizing the display helper keeps the output stable\nwhile giving future display-length changes one place to land.\n\nConstraint: Output format must stay first-12-chars plus ellipsis\nRejected: Leave duplicate slice literals in place | easy to drift on the next display tweak\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Reuse shortProjectId for any future user-facing project-id truncation\nTested: npm run typecheck --workspace @agentctxhq/agentctx\nTested: npm run build --workspace @agentctxhq/agentctx\nTested: npx biome check packages/agentctx/src/storage/namespace.ts packages/agentctx/src/cli/status.ts packages/agentctx/src/cli/reset.ts packages/agentctx/test/storage/namespace.test.ts\nTested: npx vitest run test/storage/namespace.test.ts\nNot-tested: Full workspace test suite
Contributor
Author
|
Closing this stale PR to keep my open PR queue focused. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shortProjectIdhelper and display-length constantstatusandresetto reuse that helperCloses #79
Testing
npm run typecheck --workspace @agentctxhq/agentctxnpm run build --workspace @agentctxhq/agentctxnpx biome check packages/agentctx/src/storage/namespace.ts packages/agentctx/src/cli/status.ts packages/agentctx/src/cli/reset.ts packages/agentctx/test/storage/namespace.test.tsnpx vitest run test/storage/namespace.test.tsDisclosure