Skip to content

fix: remove duplicate comment in orderProfilesByMode#21409

Merged
gumadeiras merged 3 commits intoopenclaw:mainfrom
adhitShet:fix/agents-auth-profiles-duplicate-comment
Feb 20, 2026
Merged

fix: remove duplicate comment in orderProfilesByMode#21409
gumadeiras merged 3 commits intoopenclaw:mainfrom
adhitShet:fix/agents-auth-profiles-duplicate-comment

Conversation

@adhitShet
Copy link
Copy Markdown
Contributor

@adhitShet adhitShet commented Feb 19, 2026

Summary

  • Bug fix

🤖 Generated with Claude Code

Greptile Summary

removed duplicate comment on line 148 that redundantly described the sorting behavior already explained on lines 155-156

  • the deletion itself is correct and improves code clarity
  • comment on line 147 could be updated to better reflect that type-based sorting is the primary sort criterion

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Score reflects that this is a simple comment deletion with no functional changes - removes a redundant comment that duplicated information already present elsewhere in the code
  • No files require special attention

Last reviewed commit: 0a9fbd1

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@@ -145,7 +145,6 @@ function orderProfilesByMode(order: string[], store: AuthProfileStore): string[]
}

// Sort available profiles by lastUsed (oldest first = round-robin)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment on line 147 is now misleading - it suggests only lastUsed sorting happens, but the code below primarily sorts by type (oauth > token > api_key), then by lastUsed within each type. lines 155-156 have the accurate explanation.

Suggested change
// Sort available profiles by lastUsed (oldest first = round-robin)
// Sort available profiles by type preference, then by lastUsed (oldest first = round-robin within type)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/auth-profiles/order.ts
Line: 147

Comment:
comment on line 147 is now misleading - it suggests only `lastUsed` sorting happens, but the code below primarily sorts by type (oauth > token > api_key), then by `lastUsed` within each type. lines 155-156 have the accurate explanation.

```suggestion
  // Sort available profiles by type preference, then by lastUsed (oldest first = round-robin within type)
```

How can I resolve this? If you propose a fix, please make it concise.

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: XS labels Feb 19, 2026
@adhitShet
Copy link
Copy Markdown
Contributor Author

Fixed in latest push: Updated the comment on line 147 to accurately reflect both sort criteria — // Sort available profiles by type preference, then by lastUsed (oldest first = round-robin within type)

@gumadeiras gumadeiras self-assigned this Feb 20, 2026
Adi-A and others added 3 commits February 19, 2026 19:42
Two consecutive identical comments "Sort available profiles by
lastUsed (oldest first)" were present on lines 147-148. Removed the
redundant second line.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
… sort criteria

Comment now accurately describes that sorting is by type preference (oauth > token > api_key) then by lastUsed oldest-first for round-robin within type.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@gumadeiras gumadeiras force-pushed the fix/agents-auth-profiles-duplicate-comment branch from b9d5145 to 0427165 Compare February 20, 2026 00:46
@gumadeiras gumadeiras merged commit 399781a into openclaw:main Feb 20, 2026
13 checks passed
@gumadeiras
Copy link
Copy Markdown
Member

Merged via squash.

Thanks @adhitShet!

vignesh07 pushed a commit to pahdo/openclaw that referenced this pull request Feb 20, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
anisoptera pushed a commit to anisoptera/openclaw that referenced this pull request Feb 20, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
rodrigogs pushed a commit to rodrigogs/openclaw that referenced this pull request Feb 20, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Hansen1018 added a commit to Hansen1018/openclaw that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
obviyus pushed a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 1, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

(cherry picked from commit 399781a)
hughdidit pushed a commit to hughdidit/DAISy-Agency that referenced this pull request Mar 3, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

(cherry picked from commit 399781a)
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 0427165
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants