Skip to content

Show expected flip duration on Grand Exchange offer tooltips#97

Open
mikeblunts wants to merge 1 commit into
cbrewitt:mainfrom
mikeblunts:est-time-tooltip
Open

Show expected flip duration on Grand Exchange offer tooltips#97
mikeblunts wants to merge 1 commit into
cbrewitt:mainfrom
mikeblunts:est-time-tooltip

Conversation

@mikeblunts

Copy link
Copy Markdown

Summary

Surfaces Copilot's predicted flip duration as an Est. time line on the Grand Exchange offer-slot tooltip, right under the existing Profit line.

Copilot already returns an expectedDuration with each suggestion — it's shown in the side panel ("X profit in 15 min") but nowhere on the GE screen itself. This puts it where you're actually looking: on the offer you're hovering, so you can gauge how long a flip should take without opening the panel.

How it works

  • expectedDuration only lives on the live Suggestion, so SuggestionManager now caches the most recent expected duration per item name as suggestions arrive (cleared on reset()).
  • TooltipController looks it up by item name and appends Est. time: <formatted> using the existing UIUtilities.formatSuggestionDuration, bumping the tooltip height by one line.

No backend changes — the data is already on the client.

Notes / limitations

  • Shown only for items suggested in the current session (the only time expectedDuration is available); otherwise the tooltip is unchanged.
  • It's the expected total duration (consistent with the side panel), not a live countdown.
  • Happy to gate it behind a config toggle if you'd prefer it opt-in.
  • Two natural follow-ups if you're interested: the per-item cache could be persisted across sessions, and Est. time could be shown for any item (not just suggested ones) if expectedDuration were attached to the /prices response — happy to do either.

Testing

Built against client 1.12.28 and run locally — Est. time shows under Profit on the sell-offer tooltip for suggested items.

Two files, ~28 lines: model/SuggestionManager.java, controller/TooltipController.java.

🤖 Generated with Claude Code

Cache the expectedDuration from each suggestion per item name in
SuggestionManager and surface it as an "Est. time" line on the GE
offer-slot tooltip, beneath the existing Profit line, reusing
UIUtilities.formatSuggestionDuration.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant