-
Notifications
You must be signed in to change notification settings - Fork 12
Improving context #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving context #136
Conversation
- Update link_parsers to include @username patterns - Support usernames with special characters like [bot] - Usernames will now be converted to clickable GitHub profile links
|
Caution Review failedThe pull request is closed. WalkthroughRefactors DM command handlers to accept and use a shared Context instead of a Client and env-derived keys. Updates call sites in the CLI. Adjusts error handling to return Result errors. Adds a link parser in cliff.toml to hyperlink @user mentions alongside existing PR reference parsers. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as CLI User
participant CLI as CLI Commands
participant Ctx as Context
participant DB as DB (Ctx.pool)
participant Client as Client (Ctx.client)
participant Net as Network
User->>CLI: SendDm {pubkey, order_id, message}
CLI->>CLI: execute_send_dm(pubkey, &Ctx, order_id, message)
CLI->>DB: Order::get_by_id(order_id) via Ctx.pool
DB-->>CLI: Order or error
alt Order found
CLI->>Client: send_dm(&Ctx.client, &trade_keys, message)
Client->>Net: Publish DM
Net-->>Client: Ack/Result
Client-->>CLI: Result
CLI-->>User: Result
else Order not found
CLI-->>User: Error (Result)
end
sequenceDiagram
autonumber
participant Admin as CLI Admin
participant CLI as CLI Commands
participant Ctx as Context
participant Client as Client (Ctx.client)
participant Net as Network
Admin->>CLI: AdmSendDm {receiver, message}
CLI->>CLI: execute_adm_send_dm(receiver, &Ctx, message)
CLI->>Ctx: Access ctx.context_keys (admin keys)
CLI->>Client: send_dm(&Ctx.client, &ctx.context_keys, message)
Client->>Net: Publish DM
Net-->>Client: Ack/Result
Client-->>CLI: Result
CLI-->>Admin: Result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
@grunch ,
small pr with some small improvement on commands, but mainly for testing a pr with new automatic build
Summary by CodeRabbit