# Changelog

## [v0.1.0] (2026-05-04) - Initial Release

### New Features

- **Project scaffolding** — TOC files for all WoW versions (Vanilla 11508, TBC 20505, Wrath 30405, Cata 40402, Mists 50503, Retail 110207/120001/120000), `.pkgmeta` with BigWigs packager config, `.luarc.json` (Lua 5.1 LSP), `.markdownlint.json`, and `.github/workflows/release.yml` for tag-triggered CurseForge releases.
- **Core addon** — `TOGTools.lua`: AceAddon-3.0 instance with AceConsole-3.0, AceEvent-3.0, AceHook-3.0 mixins; AceDB-3.0 schema (`char` scope); version detection flags (`gv.isVanilla`, `gv.isTBC`, `gv.isWrath`, `gv.isCata`, `gv.isMists`, `gv.isClassic`, `gv.isRetail`, `gv.isRetail120Plus`).
- **Slash commands** — `SlashCommands.lua`: all `/togt` command registration and handling in a dedicated file, separate from core addon logic. Subcommands: `/togt` (toggle window), `/togt np` (Name Prefix tab), `/togt settings` (open settings), `/togt vc` (version check).
- **Tabbed main window** — `GUI/MainWindow.lua`: dynamic AceGUI Frame + TabGroup; tabs auto-populate from `addon.modules` sorted alphabetically by `label`; per-tab locked/unlocked window sizing via `WINDOW_SIZE`; ESC-to-close proxy; position persistence via AceDB.
- **Name Prefix module** — `Modules/NamePrefix/NamePrefix.lua` + `GUI/NamePrefixTab.lua`: wraps `ChatEdit_SendText` (Classic) or hooks `EventRegistry` (Retail 12.0+) to prepend a configurable nickname to outgoing chat messages. Settings: enable/disable, nickname, format string with live preview, per-channel toggles (Guild, Officer, Party, Raid, Instance, custom channel), skip-exclamation option, suppress-if-char-name option. Per-character DB scope. Skips messages beginning with `/` (slash commands/macros) unconditionally.
- **Minimap button** — `GUI/MinimapButton.lua`: LibDataBroker-1.1 launcher + LibDBIcon-1.0 registration. Left-click toggles the main window; right-click opens the native addon settings panel. Icon: `textures/ToGTools_PH_MMB.tga`. Button show/hide state and position persisted in `DB.char`.
- **Addon settings panel** — `GUI/Settings.lua`: AceConfig-3.0 options table registered under ESC → Interface → Addons → TOG Tools (native Blizzard panel). `addon:OpenSettings()` uses `Settings.OpenToCategory` (Classic Era 1.15+ / Retail 10+), `InterfaceOptionsFrame_OpenToCategory` (older builds), or `InterfaceOptionsFrame:Show()` as a final fallback — detected by API presence, not version flag.
- **VersionCheck-1.0 integration** — `VC:Enable(Ace)` called on all non-Retail versions in `OnInitialize`; `/togt vc` broadcasts a guild-wide version check and prints responses after 21 seconds.
- **Embedded libs** — `libs/LibDataBroker-1.1.lua`, `libs/LibDBIcon-1.0.lua` (single-file embeds, copied from TOGProfessionMaster).
- **MIT License** — `LICENSE` file added; referenced in `.pkgmeta` via `license-output`.
- **CurseForge project** — Project ID `1533830` set in `.pkgmeta` and all TOC files.
- **Governance files** — `.github/copilot-instructions.md` and `CLAUDE.md` with full project rules (module pattern, commit/tag process, changelog format, HTML doc rules, no-tag rule).

### Bug Fixes

- **Name Prefix not reaching other players** — `hooksecurefunc` fires after `SendChatMessage` has already been called. Fixed by wrapping `ChatEdit_SendText` directly (`local orig = ...; ChatEdit_SendText = function(...) ... return orig(...) end`) so the prefix is applied before the message is sent. Location: `Modules/NamePrefix/NamePrefix.lua`.
- **Macros/slash commands being prefixed** — Added an unconditional early-return in `ModifyMessage` when the message starts with `/`. Location: `Modules/NamePrefix/NamePrefix.lua`.

---
