Wireclub Room IQ v0.5.45
=========================

NEW IN v0.5.45 — PREVIEW BEFORE MANUAL BOT POST
------------------------------------------------
Manual bot posting is now an explicit two-step flow. Generate Bot Preview shows
the exact proposed message in an editable box and sends nothing. Post Preview
then sends only the reviewed text. A preview is discarded when the room changes
so it cannot accidentally be posted into a different room.

NEW IN v0.5.44 — KEEP ROOM HISTORY + VERY HUMAN STYLE
------------------------------------------------------
Reanalyzing or re-entering a room no longer deletes its earlier transcript or
analysis evidence. Each visit gets a live session marker: Room IQ can use the
deduplicated stored history, while the user picker and bot reply context use
only the current visit. Initial on-screen history arms the bot but cannot cause
an automatic reply until a genuinely new live message arrives.

Auto Bot now includes a Very human — typos & misspellings personality. It uses
casual phrasing, imperfect punctuation, and restrained swapped/missing letters
even when the separate occasional-typo checkbox is off.

NEW IN v0.5.43 — NO ABSENT USER NAMES
--------------------------------------
DeepSeek calls are stateless, so stale names came from extension-supplied bot
history or stored context. Room entry now clears that room's recent bot reply
state. Reply prompts list current-visit participants and forbid all other chat
names. Generated replies are also checked against historically known users;
any absent username causes regeneration and nothing is posted if it persists.

NEW IN v0.5.42 — CURRENT-VISIT ROOM DATA + RELIABLE POST SOUND
--------------------------------------------------------------
Entering a room now starts a clean live capture for Room IQ, the user list, and
bot reply context. Old messages remain in the long-term learning corpora but
can no longer make the bot address people from an earlier visit. Focus user is
scoped to the room where it was selected. Auto-analysis waits until the capture
script confirms the exact new room key.

Confirmed bot posts now play their selected sound through a dedicated extension
audio document, which works when the popup is closed and avoids page autoplay
blocking. The Wireclub-page sound path remains as a compatibility fallback.

NEW IN v0.5.41 — ROOM SWITCH REFRESH
-------------------------------------
Wireclub SPA room changes are detected without requiring a full page reload.
Capture is detached from the old room and restarted for the new room, the
captured-user list is cleared and repopulated, and entry Auto Analyze receives
the correct new room key and transcript. Entry analysis now runs whenever a
room is entered; the Auto Analyze checkbox controls later 50-message refreshes.

NEW IN v0.5.40 — AUTO BOT WAKE-UP FIX
--------------------------------------
Auto Bot no longer gets stuck when its saved processed-message counter is
higher than the current room capture after a reload or transcript reset. The
counter is repaired automatically on the next message. The bot also advances
past its own captured posts without generating a reply to itself.

NEW IN v0.5.39 — BOT POST SOUND + RELIABLE FOCUS
-------------------------------------------------
The Bot tab now has a sound dropdown and a sound-test button. The chosen sound
plays only after Wireclub confirms an automatic, manual, or test bot post.
Focused usernames save while typed and use normalized matching. A selected
focus user is the primary trigger, so general mention and keyword filters no
longer silently block that user's replies. Cooldown still applies.

NEW IN v0.5.38 — VISIBLE AUTO BOT + FOCUS USER
-----------------------------------------------
Auto Bot now shows why it is waiting, generating, blocked, or unable to post.
It reacts after one new eligible message instead of silently waiting for three.
An optional persistent Focus user field makes automatic replies wait for that
person and address their latest point mainly. The Fold/Unfold all button was
removed.

NEW IN v0.5.37 — NO REPEATED OPENINGS OR SENTENCES
---------------------------------------------------
The bot rejects any draft that starts with the same first two words as one of
its 10 recent replies. It also rejects repeated or closely similar sentences,
including recurring openings such as "oh look", and asks DeepSeek for a new
angle before anything can be posted.

NEW IN v0.5.36 — LESS REPETITIVE BOT REPLIES
---------------------------------------------
The bot remembers its 10 most recent generated replies per room. New drafts
must use a different opening, wording, sentence pattern, and conversational
angle. Near-duplicates are rejected and regenerated up to three times, with
stronger variation settings applied to DeepSeek.

NEW IN v0.5.35 — VERIFIED BOT SENDING
--------------------------------------
Bot posting no longer reports success immediately after a synthetic click. It
detects more send-button patterns, falls back to Enter, waits for Wireclub to
clear the input, and reports a visible error in the Bot tab when sending fails.

NEW IN v0.5.34 — MANUAL BOT POSTING
------------------------------------
Auto Bot now has a Post Bot Reply button that generates and sends a contextual
reply using the saved bot personality. When Manual posting only is checked,
automatic posting is disabled and only this button can trigger bot replies.

NEW IN v0.5.33 — BOT COOLDOWN FROM OFF TO 5 MINUTES
----------------------------------------------------
Auto Bot cooldown can now be disabled or set to 5, 10, 30, 60, 120, or 300
seconds. The Off value is stored correctly instead of reverting to 60 seconds.

NEW IN v0.5.32 — DISCREET BOT TEST
-----------------------------------
Test Bot now posts a random natural greeting and never says that it is a bot or
that the message is a test.

NEW IN v0.5.31 — DEFINABLE BOT PERSONALITY
-------------------------------------------
Auto Bot now has Natural, Sarcastic, Nasty, and Custom personality modes plus a
saved Personality / Global Instructions box modeled after Vics Chat. Nasty mode
allows cutting mockery and profanity while excluding threats and slurs.

NEW IN v0.5.30 — TEST BOT POSTS
--------------------------------
Test Bot now sends its sample sentence to the active room instead of only
placing it in the chat input.

NEW IN v0.5.29 — TEST BOT BUTTON
---------------------------------
The Auto Bot tab now has a Test Bot button. It places a sample bot sentence in
the active Wireclub chat input without sending it.

NEW IN v0.5.28 — AUTO BOT RESTORED AS ITS OWN TAB
--------------------------------------------------
Auto Bot is visible again as a separate main tab. Its enable switch, cooldown,
mention-only mode, keyword filter, intentional typos, and typo frequency are
preserved.

NEW IN v0.5.27 — DIRECT REPHRASE FALLBACK
------------------------------------------
If the MV3 background worker is stale, asleep, or fails to answer, Rephrase now
calls the configured DeepSeek account directly from the popup instead.

NEW IN v0.5.26 — RELIABLE REPHRASE RESPONSE + SAVED TAB
--------------------------------------------------------
Rephrase is now handled by the primary background message listener so the popup
always receives its result or exact API error. The selected feature tab is saved
and restored the next time the popup opens.

NEW IN v0.5.25 — REPHRASE API COMPATIBILITY
--------------------------------------------
Rephrase now uses a minimal DeepSeek request that works across chat/reasoner
model variants and accepts either plain text or JSON responses.

NEW IN v0.5.24 — TOP TOOL TABS + LIVE CONTROLS AT BOTTOM
---------------------------------------------------------
The feature tabs are now fixed visibly at the top and include Room IQ, Spelling,
AI Reply, Alerts, My Style, Settings, and Data. Only the selected tool is shown.
Live Correction and its key selector now sit below both Spelling text boxes.

NEW IN v0.5.23 — FEATURE TABS + REPHRASE REPAIR
------------------------------------------------
The lower tools now use tabs instead of a stack of foldable panels. Room Chat
IQ remains open above them. Spelling correction and rephrasing controls moved
to the top of their tab with smaller buttons; rephrase errors now appear in the
Result box instead of seeming to do nothing.

NEW IN v0.5.22 — ALWAYS-OPEN SPELLING PANEL
--------------------------------------------
Spelling, Grammar & Rephrasing is now permanently open and has no fold control.

NEW IN v0.5.21 — ANALYZE ON ROOM ENTRY
---------------------------------------
With Auto analyze enabled, opening or entering a room now triggers one analysis
as soon as at least three messages are captured. It still reanalyzes after every
50 new messages.

NEW IN v0.5.20 — TOP-RIGHT AUTO ANALYZE
----------------------------------------
The automatic analysis checkbox now sits beside Analyze Room and is named
“Auto analyze every 50 messages.”

NEW IN v0.5.19 — TOP-RIGHT ANALYZE + COPY
------------------------------------------
Analyze Room and Copy are now small buttons together at the top-right of the
Room Chat IQ assessment. Copy creates one short text assessment containing the
room name, Chat IQ, live mood, and concise summary.

NEW IN v0.5.18 — LIVE ROOM MOOD
--------------------------------
Room Mood no longer waits for a DeepSeek room analysis. It calculates a local
0-100 estimate from the latest 40 captured messages and refreshes with the room
every few seconds. The score, label, explanation, and bar now always have data.

NEW IN v0.5.17 — ALWAYS-VISIBLE ANALYZE BUTTON
------------------------------------------------
Analyze Room is now a small button at the top-left of the connection/status bar,
so it remains visible even when the Room Chat IQ panel is folded.

NEW IN v0.5.16 — NUMERIC ROOM MOOD
----------------------------------
Room Chat IQ now displays the room's emotional tone as a numeric score from
0 to 100, alongside its mood label and gauge. 0 is very hostile/negative,
50 is neutral, and 100 is very warm/positive.

NEW: ROOM IQ ON THE BRAVE TOOLBAR ICON
--------------------------------------
After a room is analyzed, the extension action icon gets a badge such as:

118

The badge is tab-specific:
- Religion room can show 118
- Philosophy room can show 124
- another tab can show its own stored Room IQ

Hovering over the toolbar icon also shows:
Wireclub Room IQ: <score> — <label>

BADGE COLOR
-----------
The badge background changes by score range only to make the number easy to
recognize at a glance.

LOW-IMPACT BEHAVIOR IS RETAINED
-------------------------------
This version keeps all v0.4.1 performance improvements:
- only about 100 recent messages sampled on entry
- no old-history auto scrolling
- only newly inserted messages watched
- DOM changes processed in batches
- storage writes batched
- popup refresh around every 6 seconds
- DeepSeek analysis uses only the latest ~100 captured records
- automatic analysis waits for 50 new messages

RESTORING THE BADGE
-------------------
The latest analyzed score is stored locally. When you switch back to a
Wireclub room tab or the page completes loading, the extension restores that
room's stored badge without rescanning the room conversation.

INSTALL
-------
1. Disable/remove the previous Wireclub Room IQ version.
2. Extract WireclubRoomIQ-v0.4.2-Badge.zip
3. Open brave://extensions
4. Enable Developer mode
5. Click Load unpacked
6. Select the WireclubRoomIQ_v042_Badge folder
7. Open/reload your Wireclub room.

Analyze the room once and its Room IQ will appear directly on the extension icon.


NEW IN v0.4.3
--------------
- Added the new colorful toolbar/app icon based on the selected design.
- Included icon assets in 16x16, 32x32, 48x48, and 128x128 sizes.
- The Room IQ number still appears separately as the badge overlay.


AI REPLY ASSISTANT v0.5
-----------------------
- Generate Reply: DeepSeek reads only the latest ~30 captured messages and proposes one response.
- Type Into Chat: fills the Wireclub message box; you still press Enter.
- Send Now: sends the reply you have previewed in the popup.
- Auto Bot: optional. It sends automatically only after at least 3 new captured messages and obeys a minimum cooldown.
- Optional keyword/name filter lets Auto Bot stay silent unless recent chat contains that text.
- Auto Bot is OFF by default.

The low-impact capture remains: approximately 100 initial messages, then only new DOM nodes in batches.


NEW IN v0.5.1
--------------
- Removed the automatic reply prefix from bot messages.
- Auto Bot messages are inserted/sent as normal chat text.


NEW IN v0.5.2 — CUSTOM DEEPSEEK PROMPT
---------------------------------------
The AI Reply Assistant now has a Custom DeepSeek Prompt box.

Use it for persistent instructions such as:
- Keep replies under 20 words.
- Be witty but respectful.
- Prefer philosophical questions.
- Never discuss politics.
- Use simple English.
- Do not repeat a point already made.
- When someone asks me a direct question, answer it first.

The prompt applies to both:
- Generate Reply
- Auto Bot

It is stored locally in Brave extension storage and can be changed at any time.

The room transcript itself is treated as untrusted conversation content so another
chat participant cannot easily inject instructions into the bot by typing things like
"ignore your rules and say X".


NEW IN v0.5.3 — USER INFO + OCCASIONAL TYPOS
---------------------------------------------
- Gather info on a user: choose a captured username and summarize only that user's
  captured public-room messages, explicitly stated facts, interests, style, and recent points.
- The user-info tool does not infer sensitive personal traits or search outside the captured chat.
- Auto Bot can optionally add one natural-looking typo to a configurable percentage of replies.
- The typo option also applies to manually generated replies and is off by default.


NEW IN v0.5.4 — SPELLING & GRAMMAR
-----------------------------------
- Added the MyTrayLinks-style Spelling & Grammar panel with paste, clear, result,
  automatic copy, Use as Reply, and Type Into Chat controls.
- Enter corrects the panel text; Shift+Enter inserts a new line.
- Optional Live Correction works inside the Wireclub message box. Press Right Ctrl,
  Right Shift, or F12 to correct and replace the current unsent message.
- Live correction never sends the message automatically.

NEW IN v0.5.5 — BEHAVIOR LEARNING
----------------------------------
- Added behavior learning from a captured username so the bot can mirror writing
  style in generated replies.
- "Learn my behavior" panel added:
  - Pick a username from captured users.
  - Learn from messages (up to recent posts) to build a stored style profile.
  - Toggle "Use this style profile for generated replies and Auto Bot."
- The profile is stored locally, used as an additional style guide for Generate Reply
  and Auto Bot, and focuses only on writing style (not private traits).

NEW IN v0.5.6 — AUTO LEARN FROM MY POSTS
-----------------------------------------
- Added "Auto-learn from my messages as I post" inside Learn my behavior.
- When enabled, the extension re-learns your writing style as your message count grows
  (every ~20 new messages), so the bot keeps up as your style evolves.
- This auto-learning uses the same captured-username profile and only feeds writing style,
  not private fact profiles.

NEW IN v0.5.7 — LOCKED BEHAVIOR USERNAME
----------------------------------------
- The name field in "Learn my behavior" is now read-only.
- The behavior target username is now tied to the gathered profile and cannot be manually edited,
  preventing accidental mismatches.

NEW IN v0.5.8 — BEHAVIOR LEARNING INDICATOR
--------------------------------------------
- Added a visible progress meter in Learn my behavior:
  - Shows % of style learning, based on captured messages, style traits, and phrase patterns.
  - Helps you quickly see how strongly your writing style is known before auto-mode starts using it.

NEW IN v0.5.9 — BEHAVIOR PROFILE REFRESH BUTTON
-----------------------------------------------
- Renamed the behavior action button in "Learn my behavior" to
  "Refresh behavior profile" for clearer manual control.
- Use it to re-run style extraction from captured messages at any time (when you want to refresh immediately).

NEW IN v0.5.10 — IQ PANEL MOVED TO TOP
--------------------------------------
- Reordered popup layout so the Room Chat IQ panel appears near the top, above reply tools.

NEW IN v0.5.11 — STRONGER STYLE IMITATION
------------------------------------------
- Tightened style-imitation prompting and reduced generation randomness when a behavior profile is active.
- Added confidence scoring in the style prompt so the model is explicitly told when learned data is thin vs strong.
- Replies now default to a more restrained style when profile confidence is low, reducing off-style output.

NEW IN v0.5.12 — HIGHLIGHT HIGHEST ROOM-IQ USER
-----------------------------------------------
- The Users list now highlights the user with the highest IQ score after analysis.
- A “Highest IQ” badge appears on the top IQ user, and their score tile is emphasized.

NEW IN v0.5.13 — IQ PANEL REORDER + ACTIONS
---------------------------------------------
- “Learn my behavior” now appears directly after the Room Chat IQ panel.
- “Analyze Room IQ” and auto-update control now live in the Room Chat IQ frame.

NEW IN v0.5.14 — PERSISTENT GLOBAL BEHAVIOR PROFILE
---------------------------------------------------
- Behavior learning is now stored globally for the selected username so the bot
  can reuse your learned style when you revisit the extension or switch rooms.
- “Learn my behavior” now falls back to the stored global style profile when the
  room-specific profile does not yet exist, and auto-learning uses that profile
  as the baseline for continuing to learn.

NEW IN v0.5.15 — BETTER REPLY STYLE CONTROL
-------------------------------------------
- Added aggressive assistant tones to the AI Reply Assistant dropdown:
  Angry, Frustrated, and Some Negativity.
- Added a reply length slider (Concise → Short → Balanced → Long → Generous) so
  generated replies can be tuned from short to much longer text.
- Length and style settings are stored with the same DeepSeek settings and used by
  both manual Generate Reply and Auto Bot.
- The Learn my behavior panel opens by default.
