Skip to content

[feat(security)] : implement emergency quick-exit and disguised safe-view mode#166

Open
hrshjswniii wants to merge 2 commits into
Piyushydv08:mainfrom
hrshjswniii:feature/emergency-quick-exit
Open

[feat(security)] : implement emergency quick-exit and disguised safe-view mode#166
hrshjswniii wants to merge 2 commits into
Piyushydv08:mainfrom
hrshjswniii:feature/emergency-quick-exit

Conversation

@hrshjswniii
Copy link
Copy Markdown
Contributor

Program


GSSoC'26



🏷️ PR Type


Type of PR (check one):

  • 🐞 Bug Fix
  • ✨ Feature
  • 🛠️ Improvement / Refactor
  • 📚 Documentation


🔗 Related Issue


fixes issue #158



📝 Rationale / Motivation


  • What problem does it solve?
    • SafeVoice handles extremely sensitive information (harassment, domestic violence, abuse). Users need a way to instantly conceal their screens if an abuser, coworker, or family member unexpectedly approaches.
    • Prevents sensitive content from being exposed in public or high-risk environments.
  • How does it improve the project?
    • Introduces a global keyboard shortcut and single-click buttons to instantly replace SafeVoice with a benign Productivity Dashboard ("Disguise Mode") without losing active session states (e.g. story drafts).
    • Provides a quick redirection option ("Quick Exit") that removes SafeVoice from browser history, preventing unauthorized back-navigation.
  • Any relevant context for reviewers.
    • Toggling Disguise Mode hides the SafeVoice container via display: none and aria-hidden="true", ensuring keyboard focus and screen readers are completely locked out of the hidden session.


✨ Description of Changes


Summarize changes with details:

  • Frontend
    • src/components/DisguiseView.tsx (New): A highly realistic, functional-looking Mock Productivity Dashboard ("TaskFlow Portal") with a clock, task checklist, calendar date selector, weather forecasting, notepad editor, and innocent exit links.
    • src/components/Navbar.tsx refactored: Integrated quick triggers (EyeOff for disguise, LogOut for quick exit) in the desktop navbar, mobile header, and mobile dropdown menus.
    • src/App.tsx refactored: Wrapped the main router inside SafetyProvider and toggled AppContent occlusion when disguised.
  • Backend / API
    • src/context/SafetyContext.tsx (New): Controls safety state, hooks up global keydown listeners (Escape or Alt + Shift + D), and executes the history-replacing quick exit.


🧪 Testing Instructions


Step-by-step guide to test this PR:

  1. Setup or dependencies:
    • Run npm install and start the server.
  2. Actions to perform:
    • Disguise Mode:
      • Navigate to /share-story and write a test story.
      • Press Escape or click the "Disguise" button in the Navbar.
      • Confirm that SafeVoice disappears and the "TaskFlow" dashboard appears.
      • Add mock tasks, select days on the calendar.
      • Press Escape again or click the disguised settings logo/support portal link.
      • Confirm that SafeVoice is restored and your written story draft is preserved.
    • Quick Exit:
      • Click the "Quick Exit" button in the header.
      • Confirm that you are immediately redirected to google.com.
      • Click the browser's back button and confirm that SafeVoice does not load (history was replaced).
  3. Expected results:
    • Interface transitions instantly.
    • Session states are preserved in Disguise Mode.
    • Browser back history is clean on Quick Exit.
  4. Automated tests coverage:
    • Ran local build checks (npm run build) successfully.


👀 Impact Assessment


  • User-facing changes (UI / UX): Added safety buttons to header layouts; added a full-screen disguise view.
  • Backend/API changes: None.
  • Performance considerations: Lightweight states with negligible memory footprint.
  • Security implications: Drastically improves physical security and user privacy for survivors.
  • Cross-browser / device impact: Fully responsive on mobile, tablet, and desktop devices.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

👷 Deploy request for safevoiceforwomen pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4f947fc

@Piyushydv08
Copy link
Copy Markdown
Owner

Piyushydv08 commented Jun 4, 2026

Program

GSSoC'26

🏷️ PR Type

Type of PR (check one):

  • 🐞 Bug Fix
  • ✨ Feature
  • 🛠️ Improvement / Refactor
  • 📚 Documentation

🔗 Related Issue

fixes issue #158

📝 Rationale / Motivation

  • What problem does it solve?

    • SafeVoice handles extremely sensitive information (harassment, domestic violence, abuse). Users need a way to instantly conceal their screens if an abuser, coworker, or family member unexpectedly approaches.
    • Prevents sensitive content from being exposed in public or high-risk environments.
  • How does it improve the project?

    • Introduces a global keyboard shortcut and single-click buttons to instantly replace SafeVoice with a benign Productivity Dashboard ("Disguise Mode") without losing active session states (e.g. story drafts).
    • Provides a quick redirection option ("Quick Exit") that removes SafeVoice from browser history, preventing unauthorized back-navigation.
  • Any relevant context for reviewers.

    • Toggling Disguise Mode hides the SafeVoice container via display: none and aria-hidden="true", ensuring keyboard focus and screen readers are completely locked out of the hidden session.

✨ Description of Changes

Summarize changes with details:

  • Frontend

    • src/components/DisguiseView.tsx (New): A highly realistic, functional-looking Mock Productivity Dashboard ("TaskFlow Portal") with a clock, task checklist, calendar date selector, weather forecasting, notepad editor, and innocent exit links.
    • src/components/Navbar.tsx refactored: Integrated quick triggers (EyeOff for disguise, LogOut for quick exit) in the desktop navbar, mobile header, and mobile dropdown menus.
    • src/App.tsx refactored: Wrapped the main router inside SafetyProvider and toggled AppContent occlusion when disguised.
  • Backend / API

    • src/context/SafetyContext.tsx (New): Controls safety state, hooks up global keydown listeners (Escape or Alt + Shift + D), and executes the history-replacing quick exit.

🧪 Testing Instructions

Step-by-step guide to test this PR:

  1. Setup or dependencies:

    • Run npm install and start the server.
  2. Actions to perform:

    • Disguise Mode:

      • Navigate to /share-story and write a test story.
      • Press Escape or click the "Disguise" button in the Navbar.
      • Confirm that SafeVoice disappears and the "TaskFlow" dashboard appears.
      • Add mock tasks, select days on the calendar.
      • Press Escape again or click the disguised settings logo/support portal link.
      • Confirm that SafeVoice is restored and your written story draft is preserved.
    • Quick Exit:

      • Click the "Quick Exit" button in the header.
      • Confirm that you are immediately redirected to google.com.
      • Click the browser's back button and confirm that SafeVoice does not load (history was replaced).
  3. Expected results:

    • Interface transitions instantly.
    • Session states are preserved in Disguise Mode.
    • Browser back history is clean on Quick Exit.
  4. Automated tests coverage:

    • Ran local build checks (npm run build) successfully.

👀 Impact Assessment

  • User-facing changes (UI / UX): Added safety buttons to header layouts; added a full-screen disguise view.
  • Backend/API changes: None.
  • Performance considerations: Lightweight states with negligible memory footprint.
  • Security implications: Drastically improves physical security and user privacy for survivors.
  • Cross-browser / device impact: Fully responsive on mobile, tablet, and desktop devices.

U have changes of pr #165 in your current pr and pr #165 is ready to merge so either remove changes of that pr or commit required changes

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.

2 participants