ThadXP 1.20.0
============

Detailed development notes. See README.md for the current installation guide and behavior.
Older sections below describe earlier versions.

A lightweight XP-per-pull tracker for WoW Forever, Burning Crusade Classic
Anniversary, Classic Era, Hardcore, and Season of Discovery.

DISPLAY
  - Compact exact-next-level spell preview with estimated costs, hover breakdown and a filtered Training view
  - Quiet Town checklist in details: training, completed quests, general bag space and equipped-item durability
  - Transparent blue rested-XP overlay on the main XP bar and readable rested-pool amount
  - Compact inline switch beside the quest count/XP summary: yellow ready rewards or cyan plan
  - Gold XP-bar preview for completed quest turn-ins, with a clickable ready-quest summary
  - Quests detail tab lists each completed quest reward, the total, and remaining XP to level
  - Training view: unlearned class spells grouped into available, next training level, later, and missing requirements
  - Native spell icons and rank tooltips, estimated training costs, per-character ignores, and optional training alerts
  - Tracker and expanded windows share native WoW borders, framed tabs, gold headings, and red action buttons
  - Small always-visible Progress tracker with a faint background; separate Training / Session detail window
  - Progress prioritizes your level, XP/hour, time to level, and latest pull; deeper statistics live in Session
  - Live XP, rested bonus, mob count, and duration for the current pull
  - Last completed pull
  - Session XP, pulls, average XP/pull, and XP/hour
  - Session level percentage and average XP per pull in Session; time to level on Progress
  - Thin level-progress and rested-XP bar; tracker defaults to 280 x 156 UI units
  - Hover the level bar for progress, XP needed, estimated time, and the full rested pool
  - Recent pace comparison against up to 10 qualifying pulls at the same level and location
  - Optional chat notifications for personal-best pulls
  - Mini bar chart of the last 10 pulls, oldest to newest, showing XP/minute
  - Session XP or level goals with progress and a completion celebration
  - Previous archived session result is available in Session
  - Detail window opens centered, defaults to 480 x 420 UI units, and can be moved and resized independently
  - Training / Session / Quests / Town navigation appears only in the detail window; Session includes Pull history
  - One compact Details button opens Training, Session, Quests and Town; Help and Close stay in the tracker header
  - Settings include separate scales, tracker background opacity, and optional click-through
  - Per-character, scrollable history with a configurable saved-pull limit
  - History shows as many rows as fit the detail window, up to 16, with thin pull-pace indicators
  - Click any history row to drill into that pull, then use < Pulls to return
  - Click the latest-pull line for details or Session for cumulative XP, pace, loot, and pull history
  - Mob-by-mob XP, kill cadence, XP composition, and a cumulative kill sparkline
  - Grey kills appear separately as "No XP (grey)" so wasted kills remain visible
  - Session-wide loot counts, looted copper, and display-time value estimates
  - Session view with aligned item, count, unit-value, and total columns
  - Native item icons, quality-colored names, hover tooltips, and modified-click item links
  - Exact item variants are retained and aggregated using their full item data
  - Per-pull level, location, XP/minute, XP/mob, rested bonus, and timestamp
  - Best pull highlighting and session/location summaries
  - Context-aware S-to-D grades based on median XP/minute from the latest 20 comparable pulls
  - Pulls under 15 seconds or with fewer than four kills receive a neutral "-" grade
  - In-game help panel with clickable commands and first-run guidance
  - Help opens as an independent centered dialog, regardless of tracker position
  - Level-scoped "NEW PERSONAL BEST!" notifications based on pull XP
  - Per-pull and session level-progress percentages
  - Start/end level progress in pull tooltips and DING detection
  - Persistent leveling sessions with New session actions in the header and Session view
  - Movable collapsed launcher with a live session summary and click-to-open behavior
  - Compact icon-only main-header actions for Details, New session, help, and close
  - Branded, draggable minimap button with quick card and history access
  - Custom ThadXP icon in WoW's AddOns list
  - Automatic max-level hiding with an optional saved override
  - Native Interface -> AddOns options for scale, locking, minimap, notifications,
    max-level hiding, collapsed launcher, history size, detailed-pull retention, and pull-end delay

COMMANDS
  /thadxp details Open the detail window at your last section
  /thadxp town    Open the Town checklist in the detail window
  /thadxp quests  Open completed quests and their XP breakdown
  /thadxp compact Toggle compact mode (also available in the header)
  /thadxp goal    Open the session goal editor
  /thadxp goal xp 50000  Earn another 50,000 XP from now
  /thadxp goal level 42  Reach level 42
  /thadxp goal off  Remove the session goal
  /thadxp reset   Archive the current session and start a new one
  /thadxp lock    Lock the frame
  /thadxp unlock  Unlock and show the frame; drag it with the left mouse button
  /thadxp show    Show the frame
  /thadxp hide    Hide both the card and collapsed launcher
  /thadxp minimap Toggle the minimap button
  /thadxp minimap show|hide  Explicitly show or hide the minimap button
  /thadxp maxlevel Toggle max-level auto-hiding
  /thadxp options  Open the Interface options panel
  /thadxp help    Toggle the in-game help panel
  /thadxp training Toggle class training (also in Details, or click the XP bar)
  /thadxp history Toggle pull history
  /thadxp summary Print saved-history highlights
  /thadxp resetui Reset the frame position and size
  /thadxp clearhistory  Delete all saved pull records
  /thadxp debug patterns  Report which localized chat patterns are available
  /thadxp debug blocked   Report the last protected action blamed on ThadXP

  /txp is a shorter alias for /thadxp.

INSTALLATION ON MAC
  1. Close World of Warcraft.
  2. Unzip ThadXP.zip.
  3. Move the ThadXP folder into the active Classic game's Interface/AddOns folder.
     Battle.net -> cog beside Play -> Show in Finder -> active Classic folder
     -> Interface -> AddOns
  4. Start WoW and enable "ThadXP" in the AddOns menu.

NOTES
  - Updating from an earlier version resets saved launcher and Details positions once
    because older anchors did not preserve their reference corner.
  - Minimap button: left-click toggles the card, right-click toggles history, and drag repositions it.
  - Use the card's X button to close it into the movable on-screen launcher.
    Hover the launcher for live session XP, rate, pull, loot, value, and location details.
  - Use /txp hide when you want to hide both the card and launcher completely.
  - Click the latest-pull line for its drill-down, or Session for statistics, loot, and value.
  - Use the visible Progress, Training, and Session tabs to switch views. Session includes a Pull history action.
  - Pull details replace the list in that window, and < Pulls returns to saved pulls.
  - A complete WoW restart may be required before a new AddOns-list icon appears.
  - A pull ends after the configured 1-10 second out-of-combat delay (three seconds by default).
  - Rested XP is read from the game's own rested-XP pool.
  - XP gained outside combat is not added to pull or session totals.
  - Mob counts use combat-log deaths, including grey mobs damaged during the pull.
  - Pull locations use your subzone at the beginning and end of combat.
  - History and the active session are saved per character; UI settings are account-wide.
  - Existing account-wide history is migrated to the first character loaded after updating.
  - Each character's history limit is configurable from 20 to 500 pulls (100 by default).
  - Full mob and cadence detail is retained for 25 pulls by default; adjust it in options.
    Older pulls keep their summary and grade, while mob totals are preserved for future aggregate views.
  - Loot belongs to the active session rather than an individual pull because looting often happens
    after combat or after several pulls. Starting a new session resets the live loot summary.
  - Looted copper counts positive money changes associated with an actual loot window; wallet changes
    are also correlated with localized money chat events. Vendors, repairs, purchases, and trades are
    not presented as looted gold.
  - Grey-item values always use vendor prices. Other items use Auctionator when available and
    fall back silently to vendor prices. Values are recalculated when displayed, never stored.
  - Grades use the median of the latest 20 comparable pulls at the same level and location,
    falling back to level-only when fewer than three local samples exist.
  - The active character's session survives reloads, relogs, and game restarts until you choose New session or use /txp reset.
  - At max level the tracker hides automatically; use /txp maxlevel to toggle that behavior.
  - Session level percentage adds progress at each relevant level, so it can exceed 100%.

TRAINING
  - Supports TBC Anniversary and the standard Classic Era / Hardcore class spell lists.
  - Forever uses its own nine-class beta dataset, including new spells, estimated prices, and marked book/quest sources.
  - Seasonal additions, pet training, warlock pet tomes, and weapon training are not included.
  - Click the Training tab or the training summary on Progress, click the XP bar, or use /txp training.
  - Hover the XP bar for the available-spell count and next training level.
  - Right-click a spell to ignore or restore it; ignored spells remain in the Ignored section.
  - Shift-click a spell to insert its link into an active chat edit box.
  - Enable optional training alerts in the Training window; they are off by default.
  - Costs use bundled base prices and are estimates; the actual trainer price can differ.
  - Spell data and rank chains are adapted from What's Training? under MIT; see TrainingData/LICENSE and SOURCE.txt.

PROGRESS TRACKER AND DETAIL WINDOW (1.13.0)
  - Progress is a movable, resizable compact tracker: level, percentage, XP bar, XP/hour, time to level, latest pull, and last-pull mob count.
  - The background defaults to 20% opacity. Text remains fully readable. The native border remains visible; hover reveals the resize handle.
  - Use Details on the tracker or /txp details to open the detail window.
  - The detail window has Training / Session tabs; closing it or pressing Escape leaves the tracker untouched.
  - Tracker and detail window save separate position, dimensions, and scale. Detail tabs never resize or move either window.
  - Adjust Tracker background and Click through tracker in /txp options. With click-through enabled, use the minimap or commands to open details.
  - Session goals live in Session. Detailed loot, pull history, training reminders, and spell tooltips are preserved.
  - The first load migrates the old large tracker to 280 x 156 once, preserving its anchor and leveling records.
  - /txp resetui restores both windows to their defaults without changing leveling records.

LAYOUT IMPROVEMENTS (1.13.0)
  - Tracker metrics use aligned labels and values. Drag its background to move it; hover to reveal its resize handle.
  - Enlarging the tracker scales its text and layout together. Position lock and click-through settings are respected.
  - Session uses an Overview / Pull history selector and matching Set goal / New session action buttons.
  - Loot, history, and training columns expand with the detail window; taller history windows show additional rows.

TRACKER HEADER (1.13.0)
  - Top toolbar replaces the footer controls. Training is accessible here instead of taking a metric slot.
  - Last pull shows the last completed pull's XP, mobs, and duration, including during the next combat.

EXPANDED WINDOW STYLE (1.13.0)
  - Training, Session, history, and pull details share a native dialog border and centered framed title.
  - Attached tabs and an inset content border give navigation and tables a consistent structure.
  - Session actions and training reminder controls use native red button textures.
  - A matching Close button has its own footer; content resizes above it.
  - The compact Progress tracker now uses the matching style described below.

COMPACT TRACKER STYLE (1.13.0)
  - The tracker shares the native dialog border, framed gold title, and red action buttons of expanded windows.
  - Training / Session / History use matching framed controls in a compact navigation row.
  - New session, Help, and Close are grouped in the title row, with larger matching button areas.
  - The tracker keeps configurable background opacity, click-through, dragging, and proportional text resizing.
  - Default dimensions are 280 x 156 UI units; existing width and position are preserved.

BUTTON AND TAB POLISH (1.13.0)
  - Native button templates render red buttons correctly, with labels centered inside their full clickable area.
  - Title plates and title text are smaller; both detail navigation rows share tab widths, heights, and left edges.
  - Training alerts replaces Level-up reminders. Hover explains that alerts send a chat message when your new level unlocks class spells.

BUTTON STARTUP FIX (1.13.0)
  - Clear previous button textures through the client clear methods, with a fallback for older clients.
  - Avoid nil texture assignments that can interrupt initialization before the tracker header is built.
  - The WoW-style design remains enabled.

CLASSIC TYPOGRAPHY AND XP BAR (1.13.0)
  - Uses the client GameFontNormal font, with Friz Quadrata as fallback, across tracker and detail content.
  - Gold headings, white values, warm table accents, and black text shadows match the WoW frame.
  - The XP bar uses native textured artwork and an inset border, with purple normal XP and blue rested XP.
  - Item quality and spell availability colors retain their meaning; layout and navigation are preserved.

RESIZE RELEASE FIX (1.13.0)
  - Resize handles stay active while dragging, and left-button release is detected even outside the window.
  - The tracker applies its final proportions after sizing stops, rather than fighting mouse movement during the drag.
  - Hiding the window ends sizing; final tracker and detail dimensions are saved once on release.

ALL-SOURCE SESSION XP (1.13.0)
  - Session XP, XP/hour, time to level, and XP goals include all XP gains, including quest turn-ins and exploration outside combat.
  - Pull XP and average XP/pull use separate totals, so out-of-combat rewards do not inflate pull statistics.
  - Existing session totals and pull history are preserved. Previously ignored quest XP cannot be recovered retroactively.

XP TOOLTIP READABILITY (1.13.1)
  - XP-bar tooltip renders on the tooltip layer above addon controls, with an opaque background.
  - Opens beside the bar and stays within the screen; text is independent of tracker resizing and scale.

MINIMAL TRACKER (1.14.0)
  - A single slim header replaces the title plate and large tab row; Training, Session, and History remain one click away.
  - New session remains available inside Session; Help and Close use small header controls.
  - Tracker height is reduced from 156 to 116 UI units at its default width, preserving position and width.
  - Last pull shows XP, percentage of a level, mobs, and duration on one row.
  - Expanded windows and their navigation retain their existing layout.

FOREVER TRAINING (1.15.0)
  - Bundles 1,437 Forever class-spell records across all nine classes, adapted from the installed What's Training? for Forever 1.1.0.
  - Uses Forever-specific levels, ranks, prerequisites, talents, and faction/race filtering rather than Classic Era data.
  - Books, quests and abilities with no listed trainer appear in a separate acquisition group.
  - Unpriced abilities show Unknown; estimated prices retain explanations in tooltips.
  - Native spellbook scanning excludes future spells and tolerates unavailable known-spell APIs.
  - Data are a beta snapshot and prices remain estimates; this is not a live trainer scan. See TrainingData/Forever/SOURCE.txt and LICENSE.

FOREVER DATA REFRESH (1.15.1)
  - Updates bundled Forever spell data from What's Training? for Forever 1.1.1, downloaded from its official CurseForge release.
  - Mage teleports and portals return to trainable sections, with named portal trainers in tooltips.
  - Teleport: Dalaran remains outside trainer listings because its trainer is unconfirmed.

FOREVER COST DISPLAY FIX (1.15.2)
  - Training costs use C_CurrencyInfo.GetCoinTextureString on Forever and the legacy function on Classic clients.
  - A plain gold/silver/copper fallback handles missing or unavailable formatters.
  - Covers summary totals, spell rows, and tooltips, including zero available spells.

COMPLETED QUEST XP (1.16.0)
  - A gold segment extends from current XP to the projected turn-in total, capped at the end of the current level bar.
  - Blue rested shading remains separate; rested XP is not added to quest rewards. Earned XP and session totals are unchanged until turn-in.
  - The clickable row below Last pull shows completed quest count, reward XP, and Level up! when known rewards cover the next level.
  - Open the Quests detail tab or /txp quests for a scrollable breakdown, largest rewards first, plus remaining XP or XP beyond this level.
  - The tracker is now 136 UI units tall at its default 280-unit width. Existing width, position, and independent detail-window dimensions are preserved.
  - Uses native quest-log XP when available; on supported Classic clients, enabled Questie supplies estimated rewards as an optional fallback.
  - Estimated values have a ~ prefix. Estimates use your current level and Questie's supported XP buffs; leveling during a batch of turn-ins can change subsequent rewards.
  - Missing rewards show Unknown and are excluded from totals and the gold preview. Without native reward data or Questie, the quest list still works but XP is unknown.
  - Forever does not reuse Classic Questie data; quests without native reward XP are explicitly unknown.
  - Refreshes on quest-log, XP, level, player-buff, money, and world-entry changes. Max-level characters have no gold preview.
  - The summary respects click-through settings; use /txp quests or the detail tabs when click-through is enabled.

XP TOOLTIP CLARITY (1.16.1)
  - Gold headings separate level progress, quest turn-ins, and class training.
  - Green highlights enough XP to level; overflow XP gets its own aligned row.
  - Unknown rewards use orange; rested XP uses blue and appears only when available.
  - Short bullet hints replace long explanations. Native tooltip fonts preserve the intended colors.

QUEST XP PLANNER (1.17.0)
  - Quests has two views: Ready to turn in (the default) and Plan quests.
  - Ready to turn in retains the completed-quest list and yellow reward preview.
  - Plan quests lists all logged quests under the same zone/dungeon headings as the quest log.
  - Check individual quests or an entire group; a dash on a group checkbox means only some quests are selected.
  - Select all and Clear appear only in the planner. Failed quests are shown but cannot be selected.
  - Group XP is the full group reward; the total above the list is only the selected quests. Completed quests have a green Ready to turn in label.
  - The active plan replaces the yellow preview with cyan and labels the tracker summary Plan. Completed quests are counted only once when selected.
  - Switch back to Ready to turn in to restore the yellow preview without losing your selection.
  - Selections are saved per character. After login or reload, Ready to turn in is always the initial view; reopen Plan quests to use your saved selection.
  - Removed quests leave the plan. Quest completions, rewards, XP and supported buffs update the totals automatically.
  - Planning covers quest rewards only, evaluated at your current level; enemy XP is additional. Unknown rewards are excluded, and ~ marks estimates.
  - Open with the tracker summary, the Quests detail tab, or /txp quests. No separate addon is needed.

RESTED STRIP AND EXPLICIT PREVIEW (1.18.0)
  - Earned XP stays purple; a separate blue strip below the main bar shows rested bonus coverage from your current XP position. Quest previews cannot cover it.
  - The rested label and hover tooltip report the full pool, even when its coverage extends beyond the current level. Rested XP is not added to quest rewards.
  - Empty pools have no blue fill. Max-level characters hide the rested strip. Small positive pools are no longer suppressed by the old one-percent threshold.
  - The tracker includes XP preview: Ready quests / Quest plan. The active choice has a matching colored highlight and underline.
  - Ready quests previews completed rewards in yellow; Quest plan previews only selected rewards in cyan.
  - Browsing Ready to turn in or Plan quests in the detail window no longer changes the bar. The detail totals always describe the view you are browsing.
  - Use the Show ready quests on XP bar / Show plan on XP bar button in Quests, or the tracker selector, to explicitly change the preview.
  - Clicking the tracker quest summary opens details for the preview currently shown. Selections are retained when switching previews; Ready quests remains the default after reload/login.
  - Tracker height is 160 UI units at the default width of 280, allowing the rested strip and preview controls to remain readable.
  - New controls respect tracker scaling, locking and click-through settings.

TRAINING DATA AUDIT AND FOREVER REFRESH (1.18.1)
  - Checked upstream releases on 2026-10-16. TBC and Vanilla class tables match What's Training? 10.1.0, after excluding hunter pet training. No spell changes were needed for those clients.
  - Forever trainer and race-specific quest-spell tables now use What's Training? 11.0.0-beta20, commit 716de2c8443380cd71fb0bb374fe1f0ca97d9d95.
  - Updates all nine classes, including new spell IDs, corrected levels/base prices/prerequisites, explicit rank replacements, and quest-source information for races including IDs 95/96.
  - Examples: Ice Lance rank 2 base price is 3000 copper; Berserker Rage is level 30 at 12000 copper; Night Elf Cat Form and Human Divine Grace are marked as quest rewards.
  - Hunter pet-training abilities remain excluded. New spells use native names when available and a safe Spell #ID placeholder while name data are loading.
  - Existing descriptive names, portal trainer names, and supplemental book/unconfirmed-source notes are retained from the earlier Forever fork 1.1.1; these older supplemental notes were not verified by beta20.
  - Training prices remain base estimates and can differ from actual reputation-discounted trainer prices or later beta changes. The addon still runs independently of What's Training?.
  - Source versions, input hashes, and licenses are recorded in TrainingData/SOURCE.txt and TrainingData/Forever/SOURCE.txt.

RESTED XP ON THE MAIN BAR (1.18.2)
  - Replaces the separate rested strip with a translucent blue overlay inside the main XP bar, drawn above yellow ready-quest and cyan plan previews.
  - The underlying quest-preview colors remain visible. A light-blue endpoint marks where the rested coverage ends.
  - Rested coverage begins at current earned XP and is capped at the current level. The label and tooltip still show the full remaining rested pool.
  - Rested XP remains a separate kill-XP bonus; overlapping the quest preview does not add rested XP to quest rewards.
  - The transparent overlay does not intercept clicks or mouse hover. Preview controls and independent quest browsing are preserved.
  - Removes the strip spacing; default tracker dimensions are now 280 x 156 UI units.

COMPACT QUEST PREVIEW SWITCH (1.18.3)
  - Removes the dedicated XP preview row and its large Ready quests / Quest plan buttons.
  - Keeps the quest count and XP total on one row, with a small neutral switch control at the right.
  - Click switch to alternate yellow ready-quest and cyan selected-plan previews. Hover explains which preview the next click will show.
  - The summary remains clickable to open details; browsing the Quests tab still does not change the preview.
  - Tracker height returns to 136 UI units at its default 280-unit width. Position, width, saved quest selections and rested overlay are preserved.

ACTIVE PREVIEW LABEL (1.18.4)
  - The compact control now says Ready or Plan to identify the active XP preview.
  - It keeps the same width and position; clicking still switches to the other preview.

TOWN CHECKLIST (1.19.0)
  - Open Town in the detail window, or use /txp town. No pop-ups, chat alerts or automatic opening.
  - Training shows currently available, unignored class spells, estimated known costs, unknown-price warnings and whether known costs fit your current money. Click to open Training.
  - Completed quests shows only ready-to-turn-in quests and their XP, even while the bar previews a plan. Click for the ready quest list without changing the XP-bar preview.
  - Quest turn-in locations may differ; the checklist does not claim they can all be handed in at one town. Known rewards that cover the next level are highlighted in the note.
  - Bag space counts free slots in the backpack and equipped general-purpose bags. Specialty bags, reagent bags and bank storage are excluded. Amber means at most 4 free slots or at most 20 percent free.
  - Durability shows the lowest percentage among equipped durable items. At or below 50 percent is amber; broken equipment is red. Repair costs are not estimated.
  - Missing client data shows Unavailable rather than a misleading zero. Training is optional; book/quest spell acquisition and ignored spells are excluded from its purchase checklist.
  - Four compact rows use green for clear status, amber for attention and grey for unavailable data. The list scrolls in smaller detail windows.
  - Updates while open for bag, equipment, spell, quest, level and money changes. Tracker layout, quest plans and training preferences are preserved.

ONE DETAILS BUTTON (1.19.1)
  - The tracker header now has one compact Details button instead of separate Training, Session and History shortcuts. Help and Close remain beside it.
  - Details opens the shared window with Training, Session, Quests and Town tabs. Pull history remains inside Session.
  - Reopens your last section, including after reload/login; defaults to Session if no valid section was saved. A pull drill-down remembers Session for the next visit.
  - The quest summary and latest-pull line retain their direct links. Tracker width, height and preview controls are preserved.
  - /txp details also opens the window. Click-through settings still apply to tracker controls.

NEXT-LEVEL TRAINING PREVIEW (1.20.0)
  - A quiet single-line summary below the quest summary shows the next character level, unlearned trainer-spell count, and estimated combined cost.
  - Hover for spell names, ranks and individual prices. Click to open Training in its Next level view; All training restores the complete list.
  - Uses exactly your current level plus one, not the next later level that happens to have training. Empty levels explicitly show no new training.
  - Known and ignored spells, books/quest rewards, unlisted-trainer abilities and ranks requiring an unlearned talent are excluded. Character race/faction filters still apply.
  - Spells requiring earlier ranks remain in the preview with a prerequisite warning. The estimated total covers the next-level ranks only; earlier-rank costs are extra.
  - Unknown prices are labeled and excluded from the known total. Prices remain base estimates and may differ at the trainer.
  - Updates on level, learned-spell and training-ignore changes; max-level and unsupported clients show explicit messages.
  - Town's Training link continues to open current training. The compact tracker link respects scaling and click-through. No new alerts are enabled.
  - Default tracker size is 280 x 152 UI units, with one 14-unit text line added. Detail-window dimensions are preserved.
