Skip to content

Add Phase 3 community voting and issue reporting (THE-109, THE-110)#588

Merged
s0lray merged 2 commits intomasterfrom
feature/THE-109-110-phase3-community-features
Mar 26, 2026
Merged

Add Phase 3 community voting and issue reporting (THE-109, THE-110)#588
s0lray merged 2 commits intomasterfrom
feature/THE-109-110-phase3-community-features

Conversation

@s0lray
Copy link
Copy Markdown
Contributor

@s0lray s0lray commented Mar 26, 2026

Summary

Implements both Phase 3 community features from the Tool Details Panel plan.

Voting system (THE-109)

Backend (src/worker.js):

  • New POST /api/vote endpoint: accepts { tool_id, direction, session_hash } where direction is "up", "down", or null
  • One vote per tool per session; sending the same direction again toggles the vote off
  • Returns { ok, score, userVote } so the frontend can update UI without a follow-up fetch
  • GET /api/tool-stats now includes votes: { up, down, score } alongside clicks

Frontend (public/js/arf.js + public/index.html + public/css/panel.css):

  • Vote UI replaces the static rating placeholder: thumbs up / net score / thumbs down
  • Score color: green (positive), red (negative), gray (zero)
  • User's current vote highlighted with filled button (.active class)
  • Vote state persisted in sessionStorage to avoid extra API calls on panel reopen
  • Live score fetched async from /api/tool-stats on panel open

Issue reporting system (THE-110)

Backend (src/worker.js):

  • New POST /api/report endpoint: accepts { tool_id, report_type, session_hash } where report_type is dead_link, paywalled, or incorrect_info
  • Per-session dedup with 7-day TTL
  • When count reaches 3, auto-creates a GitHub issue on lockfale/OSINT-Framework; a flag prevents duplicate creation
  • Requires GITHUB_TOKEN Worker secret; if absent, reporting still works but no GitHub issue is created

Frontend:

  • Static GitHub link replaced with three inline buttons: Dead link / Paywalled / Incorrect info
  • Buttons disable on submit; inline feedback confirms success or already-reported state

Deployment note

Add the GitHub token secret before deploying: wrangler secret put GITHUB_TOKEN

s0lray and others added 2 commits March 26, 2026 00:49
…113)

Populate enrichment fields for all 17 tools in the Username category
(Username Search Engines + Specific Sites). Each tool now includes
description, status, pricing, bestFor, input/output, opsec rating,
and badge flags (localInstall, googleDork, registration, editUrl,
api, invitationOnly, deprecated).

All URLs verified as live on 2026-03-26.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Backend (src/worker.js):
- Add POST /api/vote: upvote/downvote with toggle behavior, one vote per
  session per tool, returns net score
- Add POST /api/report: flag tools as dead_link/paywalled/incorrect_info;
  auto-creates GitHub issue via GitHub API when REPORT_THRESHOLD (3) unique
  reports of the same type are received (requires GITHUB_TOKEN secret)
- Update GET /api/tool-stats to include votes { up, down, score }
- Extract validateCommon() and isRateLimited() helpers to reduce duplication

Frontend (public/js/arf.js):
- Replace static rating placeholder with _renderVoteUI(): renders thumbs
  up/down buttons, reads cached vote from sessionStorage, fetches live score
  async from /api/tool-stats
- Add _castVote(): fires POST /api/vote, updates button active state and
  score display, persists user vote in sessionStorage
- Add _resetReportButtons() and _submitReport(): wire report buttons per
  panel open, POST /api/report, show inline feedback message

HTML (public/index.html):
- Replace static rating span with vote row (thumbs up, score, thumbs down)
- Replace static GitHub report link with three report buttons + feedback div

CSS (public/css/panel.css):
- Add .vote-btn, .vote-score (.positive/.negative/.zero) styles
- Add .report-btn, .panel-report-feedback styles
- Remove old #panel-report-link styles (replaced by button row)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
osint-framework 7412c6a Commit Preview URL

Branch Preview URL
Mar 26 2026, 04:56 AM

@s0lray s0lray marked this pull request as ready for review March 26, 2026 14:37
@s0lray s0lray merged commit 5da3ce8 into master Mar 26, 2026
4 checks passed
@s0lray s0lray deleted the feature/THE-109-110-phase3-community-features branch March 26, 2026 14:41
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.

1 participant