Skip to content

Make client-side features free, no authentication required + chart price fix - #114

Merged
AntonyGarand merged 2 commits into
masterfrom
feature/free-client-features
Oct 20, 2026
Merged

AntonyGarand merged 2 commits into
masterfrom
feature/free-client-features

Conversation

@AntonyGarand

@AntonyGarand AntonyGarand commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two changes, both aimed at making the plugin usable without an account:

  1. All client-side features are now free — no authentication or premium required. Auth is only needed for features that call our own API (api.osrs.cloud); wiki API (prices.runescape.wiki) and locally computed features are untouched by auth.
  2. Fixes the chart price picker: clicking a price on the offer-page chart and then the ... button no longer auto-entered the price into the prompt.

Client-side features now free (no auth/premium checks)

  • GE slot enhancement (SlotStateDrawer): colored borders + quick-look tooltips in the GE interface no longer check premium
  • Slots tab (SlotPanel): slot status coloring no longer checks premium; the magnifying-glass quick-look icon is always visible
  • Offer page price graph (OfferGraphChartOverlay): no premium check (data comes from the wiki timeseries API)
  • Wiki price polling (WikiDataFetcherJob): with the panel closed, polling continues whenever slot enhancement is enabled (a plain user preference) instead of requiring premium; the premium-only 30s interval is removed — everyone uses the standard 60s

Auth still required (unchanged) for own-API features

  • Slot sync to our server (SlotSenderJob, gated by canCommunicateWithApi)
  • Account registration / RSN checks
  • JWT login/refresh and the login panel

Cleanup

  • Removed the premium concept from the plugin: ApiAuthHandler.isPremium, premium subscriptions, and the resub panel in LoggedInPanel
  • setPremiumStatus() replaced by checkApiSession(), which still validates the stored JWT against our API and drives the existing login-error/retry UX
  • shouldEnhanceSlots() is now side-effect free (reads via viewAccountWideData()) since the wiki job polls it every second — the old dirty-marking read would have caused constant autosaves
  • User DTO: dropped unused isPremium
  • README: updated stale "premium users' slots" wording

Chart price fix

The price prompt moved to the long input mode (MESLAYERMODE 30) in the 2026-09-30 game update and no longer reliably runs script 108 when opened via the ... button, so the pending chart price was never entered. Additionally, render() could clear the pending price while the prompt was open because the GE frame state during the prompt is unreliable.

  • The pending price is now entered as soon as the price input mode opens (VarClientIntChanged on MESLAYERMODE == 30, mirroring how GameUiChangesHandler detects prompts), with the script 108 path kept as a fallback
  • Only the long (price) input mode consumes the pending price — quantity prompts (int input mode) are unaffected
  • render() no longer clears the pending price while a numeric prompt is open

Testing

  • gradlew clean build passes, including new OfferGraphChartOverlayTest covering: price prompt entering the pending price, quantity prompt not consuming it, unrelated varc changes being ignored, and the script 108 fallback

Summary by CodeRabbit

  • New Features

    • API-backed features, wiki data, slot enhancement visuals, and offer graphs now use account session and feature settings rather than premium-status checks.
    • Slot enhancement availability is handled safely when account data is unavailable.
    • Offer price entry now preserves pending prices and responds to long-input mode changes.
  • Bug Fixes

    • Improved session validation and error handling during login and retry.
    • The slot status icon is now consistently visible.
  • Documentation

    • Updated the jobs description to reflect slot data processing for logged-in users.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a0b9062-989c-4623-be8b-8b0118ce286d
📥 Commits

Reviewing files that changed from the base of the PR and between eca5bd0 and 7ee326a.

📒 Files selected for processing: 11
  • README.md
  • src/main/java/com/flippingutilities/controller/ApiAuthHandler.java
  • src/main/java/com/flippingutilities/controller/FlippingPlugin.java
  • src/main/java/com/flippingutilities/jobs/WikiDataFetcherJob.java
  • src/main/java/com/flippingutilities/ui/login/LoggedInPanel.java
  • src/main/java/com/flippingutilities/ui/login/LoginPanel.java
  • src/main/java/com/flippingutilities/ui/slots/SlotPanel.java
  • src/main/java/com/flippingutilities/ui/widgets/OfferGraphChartOverlay.java
  • src/main/java/com/flippingutilities/ui/widgets/SlotStateDrawer.java
  • src/main/java/com/flippingutilities/utilities/User.java
  • src/test/java/com/flippingutilities/ui/widgets/OfferGraphChartOverlayTest.java
+-----------------------------------------------------------+
| This loop is doing cardio. Your users are doing timeouts. |
+-----------------------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AntonyGarand
AntonyGarand marked this pull request as ready for review October 20, 2026 02:19
@AntonyGarand
AntonyGarand merged commit a2e9d8c into master Oct 20, 2026
3 of 5 checks passed
@AntonyGarand
AntonyGarand deleted the feature/free-client-features branch October 20, 2026 02:23
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