Commit Graph
152 Commits
Author SHA1 Message Date
shay f43beb2ef6 feat(workflows): add health check workflow for automated monitoring. 2026-04-20 12:57:58 -04:00
Shay ManorandGitHub b98b32f030 Merge pull request #3 from ShayManor/feat/streaks-widget
Feat/streaks widget
2026-04-20 12:45:38 -04:00
shay 1d0fd3013e feat(streaks): persist streaks on refresh and pass to renderer
Phase 1 worker now reads the stored streak, computes an updated one via
processor.compute_streaks, persists it to the DB (preserving the all-time
max across settings changes), and includes it in widget_data. Phase 2
_render_widgets pre-reads the stored streak and passes it to the processor.
2026-04-20 11:52:22 -04:00
shay 788470cae0 feat(streaks): enable streaks widget by default 2026-04-20 11:49:43 -04:00
shayandClaude Opus 4.7 f23449a17e feat(streaks): render streaks widget in generate_widgets_from_github
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 11:48:09 -04:00
shay cb7a00d7c4 feat(streaks): add streaks widget renderer
Add render_streaks_widget() to generator/src/widgets/streaks.py with
flame/trophy icons, two-column layout, optional date display, and
export it from the widgets package; append 3 smoke tests (all 11 pass).
2026-04-20 11:45:51 -04:00
shayandClaude Sonnet 4.6 3b00a0aeac feat(streaks): compute current and max streak with grace day
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 11:42:59 -04:00
shayandClaude Sonnet 4.6 7fb1ba3e01 feat(streaks): add user_streaks table and get/put helpers
Adds the user_streaks table to settings.db schema and implements
get_user_streak / put_user_streak helpers with upsert semantics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 11:40:13 -04:00
shay dd4a3d50d8 feat(streaks): add StreakData model 2026-04-20 11:36:45 -04:00
shay 5a2bc11840 feat(ui): enhance AuthButton styling and position for better UX. 2026-04-19 21:51:30 -04:00
shay fa96adb5d1 feat(docs): update instance URL and enhance README formatting. 2026-04-19 21:51:23 -04:00
Shay ManorandGitHub 728f3f038d Merge pull request #2 from ShayManor/oauth
Oauth
2026-04-19 21:02:25 -04:00
shayandClaude Opus 4.7 f9caa61c77 fix(frontend): send cookies on /generate POST
Without credentials: 'include', the session cookie isn't attached and
the OAuth-guarded endpoint returns 401.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 20:10:14 -04:00
shayandClaude Opus 4.7 9e837519cc feat(deploy): wire OAuth secrets; rename env vars off GITHUB_ prefix
GitHub Actions rejects secret names starting with GITHUB_. Rename the
OAuth env vars to GH_OAUTH_* in config.py, compose.yml, and the deploy
workflow so the values can flow through Actions secrets into the
generator container.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 20:02:52 -04:00
shayandClaude Opus 4.7 be8823c4cf chore(frontend): delete lib/editToken.ts (replaced by OAuth)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 19:18:32 -04:00
shay ccdd8231ce feat(frontend): gate WorkshopScreen edit UI on OAuth login match 2026-04-19 19:16:59 -04:00
shay cd927e686f feat(frontend): AuthButton — GitHub sign-in / avatar chip 2026-04-19 19:14:06 -04:00
shayandClaude Sonnet 4.6 8ccc0af1cf feat(frontend): App fetches /me, removes editToken plumbing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 19:12:36 -04:00
shay b2baded94a feat(frontend): add lib/auth.ts with fetchMe, signInUrl, signOut 2026-04-19 19:10:05 -04:00
shay 8b7f999adc feat(api): per-login mutate rate limit layered on per-IP 2026-04-19 19:09:04 -04:00
shay 0cd7bf339d feat(api): remove public /enroll endpoint and auto-enroll on /data 2026-04-19 19:06:38 -04:00
shay 91f6328efd feat(api): /generate and /refresh use OAuth session; remove edit_token helpers 2026-04-19 19:03:16 -04:00
shay 4ee71e0b86 feat(api): PATCH /settings uses OAuth session + same-origin 2026-04-19 18:59:46 -04:00
shayandClaude Opus 4.7 eb4b68bf0d feat(api): OAuth callback — verify state, fetch profile, implicit enroll
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 18:57:20 -04:00
shayandClaude Opus 4.7 98c40ff993 feat(api): add /api/auth/github/login with CSRF state + local-only next
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 18:54:44 -04:00
shay a6356d4d1d feat(api): add /api/auth/me and /api/auth/logout 2026-04-19 18:53:12 -04:00
shay 232812b3a0 feat(api): configure Flask session + init OAuth client 2026-04-19 18:51:22 -04:00
shay 4602bb9494 test(auth): unit tests for require_github_owner and require_same_origin 2026-04-19 18:49:39 -04:00
shay ccd0f63fa8 feat(auth): add OAuth client + require_github_owner/require_same_origin decorators 2026-04-19 18:48:14 -04:00
shay ec9d4c3672 db: remove dead _hash_edit_token; convert verify_edit_token to stub
_hash_edit_token was only called by verify_edit_token and has no remaining
callers in db.py (enroll no longer hashes tokens). Remove it along with the
unused 'secrets' and 'hmac' imports.

Keep verify_edit_token as a NotImplementedError stub since api.py's
require_edit_token decorator still references it. Task 12 will remove both
the decorator and this function together when switching to session-based auth.
2026-04-19 18:47:11 -04:00
shay 22483aea19 db: enroll() accepts github profile; no longer returns edit_token 2026-04-19 18:45:26 -04:00
shay 57b782ceaf db: add github_id and github_avatar_url columns + set_github_profile 2026-04-19 18:44:01 -04:00
shay 4822272b49 config: add GitHub OAuth + session env vars 2026-04-19 18:40:28 -04:00
shayandClaude Opus 4.7 1501139143 deps: add authlib for GitHub OAuth
Pins authlib>=1.3,<2 so the generator can register a GitHub OAuth
client for the upcoming login flow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 18:39:45 -04:00
shay 58e794fd57 feat(tags): add auto-awarded profile tags and validation utilities. 2026-04-19 09:37:32 -04:00
shay ca74e91e3e feat(readme): update README to describe new SVG widget features. 2026-04-19 09:34:40 -04:00
shay 016583c9f3 feat(api): implement per-user edit token for settings mutations 2026-04-19 09:34:26 -04:00
shay 3ecb6ad67b feat(tags): implement custom tag color merging and label support 2026-04-18 14:52:32 -04:00
shay 3e70e4b4ef feat(languages): add hidden languages picker and enrich language data 2026-04-18 13:39:44 -04:00
shay 5198eab86a feat(icons): replace inline SVGs with consistent JSX properties for icons 2026-04-18 13:17:00 -04:00
shay 12fb6c331b feat(worker): add achievements parameter to widget settings processing 2026-04-18 13:05:49 -04:00
shay 89a05f2a59 chore(WorkshopScreen): update ICONS type from JSX.Element to ReactNode 2026-04-18 12:51:48 -04:00
shay 3aebd40279 chore(favicon): replace old SVG with new design for favicon icon
chore(ResultScreen): simplify embed section layout and improve copy button
chore(WorkshopScreen): replace emoji icons with inline SVGs for consistency
chore(index.html): update page
2026-04-18 12:50:23 -04:00
shay eadd074402 chore(App): add PATCH request to sync user settings with backend before render 2026-04-18 12:40:16 -04:00
shay dd45d49c22 chore(ResultScreen): add copy functionality for embed snippet button 2026-04-18 12:35:27 -04:00
shay 8ac657b874 chore(ResultScreen): update props to reflect SVG generation process changes 2026-04-18 12:17:25 -04:00
shay 7b2301cec0 chore(api): rename test function for clarity on enrollment behavior 2026-04-18 11:58:02 -04:00
shay f9c59d934d chore(api): add asynchronous build kickoff for improved responsiveness 2026-04-18 11:26:25 -04:00
shay 3ffb2cfb6f chore(frontend): add demo data 2026-04-18 11:15:16 -04:00
shay 79b9c31197 feat(api): implement precomputed widget data storage and retrieval. 2026-04-18 11:13:43 -04:00