Skip to content

feat: General mode (Summarize/Rewrite/Translate/Extract) + persisted mode & AI gating#16

Open
HooplaHoorah wants to merge 2 commits into
mainfrom
feat/general-mode
Open

feat: General mode (Summarize/Rewrite/Translate/Extract) + persisted mode & AI gating#16
HooplaHoorah wants to merge 2 commits into
mainfrom
feat/general-mode

Conversation

@HooplaHoorah

Copy link
Copy Markdown
Owner

What

  • Added General mode UI next to Math (textarea + actions).
  • Actions: Summarize, Rewrite (tone selector), Translate (language selector), Extract (type selector).
  • Persist mode with chrome.storage.sync; default to General.
  • Gate all General actions behind AI readiness (mirrors Math gating).
  • Pre-disable General buttons via data-ai-only until probe completes.
  • Append-only JS to avoid regressions; Math behavior unchanged.

Why

  • Expands extension beyond math-only to common web tasks (summary, rewrite, translate, extract).
  • Keeps UX consistent: same side panel, same AI readiness signals, mode persistence across tabs.

How to test

  1. Load extension (chrome://extensions → Reload).
  2. Open the side panel → toggle General | Math.
  3. On any page, select text → Send selection → Web-to-Quest (or paste into General input).
  4. In General:
    • Click Summarize → result appears in “Result”.
    • Rewrite with different tones (Friendly/Concise/Formal/Simplify) → result updates.
    • Translate (e.g., Spanish) → result updates.
    • Extract (Highlights/Key points/Dates/People/Tasks) → result updates.
  5. Toggle Enable AI features off → all General buttons disable; on → re-enable.
  6. Switch to Math and verify: Generate steps / Explain this step / Check answer still work.
  7. Close & reopen panel → previously selected mode persists.

Notes

  • General calls W2Q_AI.summarize/rewrite/translate/extract, or W2Q_AI.general(...), or W2Q_AI.prompt(...) as fallback.
  • No changes to manifest beyond existing "storage" permission (already present).
  • Non-breaking change; UI wrapped in .for-general and .for-math.

Checklist

  • No final answers leak into Steps (Math)
  • General buttons disabled until AI ready (and when AI disabled)
  • Mode persists between tabs/panel sessions
  • Screenshots attached (follow-up)
  • README/Docs mention General mode (follow-up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant