Skip to content

Get ready for the YSWS start - #3

Merged
Heliodex merged 129 commits into
prodfrom
main
Sep 8, 2026
Merged

Get ready for the YSWS start#3
Heliodex merged 129 commits into
prodfrom
main

Conversation

@KavyanshKhaitan2

Copy link
Copy Markdown
Collaborator

Merging main into prod.

cc @Heliodex

KavyanshKhaitan2 and others added 21 commits August 28, 2026 21:18
Bumps [cryptography](https://github.com/pyca/cryptography) from 49.0.0 to 50.0.0.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@49.0.0...50.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 50.0.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sqlparse](https://github.com/andialbrecht/sqlparse) from 0.5.5 to 0.6.0.
- [Changelog](https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG)
- [Commits](andialbrecht/sqlparse@0.5.5...0.6.0)

---
updated-dependencies:
- dependency-name: sqlparse
  dependency-version: 0.6.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread twisted/twisted_site/templates/client/dashboard.html Fixed
Comment thread twisted/twisted_site/views/client/journal.py Dismissed
Comment thread twisted/twisted_site/views/client/journal.py Dismissed
Comment thread twisted/twisted_site/views/client/journal.py Dismissed
Comment thread twisted/twisted_site/templates/client/dashboard.html Fixed
Comment thread twisted/twisted_site/views/admin/review.py Dismissed
Comment thread twisted/twisted_site/views/admin/users.py Dismissed
Comment thread twisted/twisted_site/views/admin/users.py Dismissed
Comment thread twisted/twisted_site/views/image_upload.py Dismissed
Comment thread twisted/twisted_site/views/image_upload.py Dismissed
@socket-security

socket-security Bot commented Sep 8, 2026

Copy link
Copy Markdown

…rect'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are confirmed runtime issues (e.g., missing URL kwargs causing NoReverseMatch and mutable default dicts leaking state between requests) that must be fixed before deployment.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR merges main into prod to prepare Twisted for the YSWS start, introducing/expanding core user flows (projects, journals, shipping), referrals, image uploads, and a new admin surface (dashboard, pathways, users, audit logs) alongside significant template/UI and infrastructure updates.

Changes:

  • Added/updated client views for projects (create/settings/detail/ship), journals (hackatime/untracked/delete), referrals, pathways, discover, and dashboard startup windows.
  • Added Ari integration (webhook endpoint + outbound signing helpers) and new admin views/templates for review tooling, analytics, pathways management, user management, and audit logs.
  • Updated auth flow/security settings, Slack bot wrapper, Tailwind/Cotton UI templates, and deployment/runtime configuration (Docker, gunicorn, compose, env examples, deps).
File summaries
File Description
twisted/twisted_site/views/image_upload.py Adds authenticated image upload endpoint backed by R2/S3.
twisted/twisted_site/views/client/referrals.py Adds referral page and referral code generation.
twisted/twisted_site/views/client/projects.py Updates project create flow and validates project type.
twisted/twisted_site/views/client/project.py Expands project detail/settings and adds shipping flow.
twisted/twisted_site/views/client/pathways.py Adds client pathways listing view.
twisted/twisted_site/views/client/journal.py Introduces new journal flows (hackatime/untracked/delete).
twisted/twisted_site/views/client/homepage.py Adds referral cookie capture and login-enabled toggle.
twisted/twisted_site/views/client/discover.py Adds project discovery view with pagination.
twisted/twisted_site/views/client/dashboard.py Adds dashboard startup window support via query param.
twisted/twisted_site/views/client/auth.py Hardens OAuth state handling; enriches profile sync and referrals.
twisted/twisted_site/views/client/init.py Centralizes client view exports for URL routing.
twisted/twisted_site/views/ari.py Adds Ari webhook receiver and Slack notification formatting.
twisted/twisted_site/views/admin/users.py Adds admin user list/detail with actions and audit logging.
twisted/twisted_site/views/admin/shop.py Adds placeholder admin shop view.
twisted/twisted_site/views/admin/review.py Adds admin review view + debug review tooling.
twisted/twisted_site/views/admin/pathways.py Adds admin pathways list/detail/create flows.
twisted/twisted_site/views/admin/fulfillment.py Adds placeholder admin fulfillment view.
twisted/twisted_site/views/admin/dashboard.py Adds admin analytics dashboard computation.
twisted/twisted_site/views/admin/audit_logs.py Adds paginated audit log viewer.
twisted/twisted_site/views/admin/announcements.py Adds placeholder admin announcements view.
twisted/twisted_site/views/admin/admin.py Adds admin base view with sidebar and audit log dispatch wrapper.
twisted/twisted_site/views/admin/init.py Centralizes admin view exports for URL routing.
twisted/twisted_site/urls.py Reworks URL routing to use consolidated client/admin modules + new endpoints.
twisted/twisted_site/templatetags/time_filters.py Enhances time formatting filters.
twisted/twisted_site/templates/cotton/svg/tick.html Adds tick SVG component.
twisted/twisted_site/templates/cotton/svg/cross.html Adds cross SVG component.
twisted/twisted_site/templates/cotton/sidebar/item.html Adds sidebar item component styling.
twisted/twisted_site/templates/cotton/sidebar/index.html Adds admin sidebar container/layout.
twisted/twisted_site/templates/cotton/ship_message.html Adds ship message component.
twisted/twisted_site/templates/cotton/project_ship_mark.html Adds status mark UI for ship states.
twisted/twisted_site/templates/cotton/pathway_card.html Adds pathway card component for admin list UI.
twisted/twisted_site/templates/cotton/mdpreview.html Adds markdown preview component.
twisted/twisted_site/templates/cotton/mdedit.html Adds markdown editor with paste-to-upload image support.
twisted/twisted_site/templates/cotton/homepage_taskbar.html Adds homepage taskbar + audio/clock/spectrum UI.
twisted/twisted_site/templates/cotton/button.html Adds reusable button component.
twisted/twisted_site/templates/cotton/base.html Adds admin base layout (Cotton UI, Alpine, HTMX, toasts).
twisted/twisted_site/templates/client/referrals.html Adds referrals UI and referral history display.
twisted/twisted_site/templates/client/projects/ship.html Adds ship submission UI.
twisted/twisted_site/templates/client/projects/settings.html Revamps settings UI incl. screenshot upload.
twisted/twisted_site/templates/client/projects/list.html Revamps projects list UI and click-to-open behavior.
twisted/twisted_site/templates/client/projects/journal/new_untracked.html Adds untracked journal UI block.
twisted/twisted_site/templates/client/projects/journal/new_journal.base.html Adds shared journal base layout.
twisted/twisted_site/templates/client/projects/journal/new_hackatime.html Adds hackatime journal UI block.
twisted/twisted_site/templates/client/projects/journal/delete.html Adds journal delete confirmation UI.
twisted/twisted_site/templates/client/projects/journal.html Removes old journal template.
twisted/twisted_site/templates/client/projects/create.html Revamps create-project UI.
twisted/twisted_site/templates/client/pathways.html Adds pathways UI.
twisted/twisted_site/templates/client/osbase.html Updates OS frame base template and shared JS/CSS.
twisted/twisted_site/templates/client/homepage.html Revamps homepage UI and navigation.
twisted/twisted_site/templates/client/faqs.html Revamps FAQs UI and taskbar integration.
twisted/twisted_site/templates/client/discover.html Adds discover UI with pagination controls.
twisted/twisted_site/templates/admin/users.html Adds admin users search/list UI with HTMX.
twisted/twisted_site/templates/admin/user.html Adds admin user detail UI.
twisted/twisted_site/templates/admin/shop.html Adds placeholder admin shop template.
twisted/twisted_site/templates/admin/review.html Adds placeholder admin review template.
twisted/twisted_site/templates/admin/pathways/list.html Adds admin pathways kanban-style list UI.
twisted/twisted_site/templates/admin/pathways/detail.html Adds admin pathway details + participants table UI.
twisted/twisted_site/templates/admin/pathways/create.html Adds admin pathway create form UI.
twisted/twisted_site/templates/admin/logs.html Adds admin audit logs UI.
twisted/twisted_site/templates/admin/fulfillment.html Adds placeholder admin fulfillment template.
twisted/twisted_site/templates/admin/debug/review.html Adds debug review UI for project ships.
twisted/twisted_site/templates/admin/dashboard.html Adds admin dashboard charts UI.
twisted/twisted_site/templates/admin/announcements.html Adds placeholder admin announcements template.
twisted/twisted_site/static/css/98.override.css Removes old Win98 override CSS.
twisted/twisted_site/slack.py Refactors SlackBot wrapper + improves error log safety.
twisted/twisted_site/migrations/0030_alter_journal_minutes_worked_and_more.py Adds non-negative validators on journal time fields.
twisted/twisted_site/migrations/0029_projectship_final_audit_note_and_more.py Adds final review fields to ProjectShip.
twisted/twisted_site/migrations/0028_remove_projectship_final_message_and_more.py Refactors ProjectShip review fields.
twisted/twisted_site/migrations/0027_profile_hca_access_token_project_screenshot_url.py Adds profile HCA token and project screenshot URL fields.
twisted/twisted_site/migrations/0026_project_playable_url.py Adds project playable URL field.
twisted/twisted_site/migrations/0025_alter_auditlog_additional_context.py Adjusts audit log additional_context nullability/default.
twisted/twisted_site/migrations/0024_auditlog_timestamp.py Adds timestamp to AuditLog.
twisted/twisted_site/migrations/0023_auditlog.py Introduces AuditLog model.
twisted/twisted_site/migrations/0022_alter_profile_referred_by.py Adjusts referral FK constraints/related_name.
twisted/twisted_site/migrations/0021_profile_my_referral_code_profile_referred_by.py Adds referral fields to Profile.
twisted/twisted_site/migrations/0020_profile_twists.py Adds twists counter to Profile.
twisted/twisted_site/migrations/0019_remove_projectship_status_projectship_final_message_and_more.py Reshapes ProjectShip review state fields.
twisted/twisted_site/migrations/0018_pathway.py Adds Pathway model.
twisted/twisted_site/migrations/0017_remove_profile_dark_theme_profile_is_allowed_and_more.py Adds access control fields; alters ProjectShip status choices.
twisted/twisted_site/migrations/0016_profile_ysws_eligible.py Adds ysws_eligible flag to Profile.
twisted/twisted_site/migrations/0015_profile_dark_theme.py Adds dark_theme flag (later removed).
twisted/twisted_site/migrations/0014_profile_is_staff.py Adds is_staff flag to Profile.
twisted/twisted_site/migrations/0013_projectship.py Introduces ProjectShip model.
twisted/twisted_site/migrations/0012_project_repo_url.py Adds repo_url to Project.
twisted/twisted_site/migrations/0011_journal_type.py Adds journal type field.
twisted/twisted_site/migrations/0010_rename_uploadedimage_uploadedfile.py Renames UploadedImage to UploadedFile.
twisted/twisted_site/migrations/0009_uploadedimage.py Introduces uploaded-file tracking model.
twisted/twisted_site/hackatime.py Switches projects() request to use params dict.
twisted/twisted_site/ari.py Adds Ari signing + webhook verification + ship status mapping.
twisted/twisted_site/admin.py Removes Django admin registrations (disables stock admin usage).
twisted/tailwindcsstheme/static_src/src/win98.css Removes legacy Win98 Tailwind source.
twisted/tailwindcsstheme/static_src/src/styles.css Major Tailwind theme refresh + utilities + scrollbar styling.
twisted/tailwindcsstheme/static_src/package.json Updates build scripts and adds typography plugin.
twisted/tailwindcsstheme/static_src/package-lock.json Locks added typography dependency.
twisted/mysite/urls.py Removes default Django admin URL include.
twisted/mysite/settings.py Moves secrets to env, hardens security defaults, adds apps/middleware, configures Ari.
twisted/mysite/middleware.py Adds timezone activation middleware via cookie.
twisted/entrypoint.sh Updates gunicorn runtime settings (threads, gthread, logs).
twisted/Dockerfile Renames build stage from development to build.
twisted/docker-compose.yml Adds explicit postgres env vars to service.
twisted/common/templates/base.html Updates base template head and timezone cookie.
twisted/.env.example Expands env example to include new settings/integrations.
TODO.md Removes old TODO list.
pyproject.toml Updates dependencies (Slack Bolt, boto3, Cotton UI, HTMX, etc.).
.vscode/settings.json Updates djangoCotton template path config.
.gitignore Stops ignoring top-level static/ directory.
Review details

Files not reviewed (2)

  • twisted/tailwindcsstheme/static_src/package-lock.json: Generated file
  • twisted/tailwindcsstheme/static_src/src/cotton-ui.sources.css: Generated file

Suppressed comments (3)

twisted/twisted_site/views/client/journal.py:129

  • Same issue here: redirecting to fr.projects.journals.new.hackatime without passing the project id will raise NoReverseMatch.
    twisted/twisted_site/views/client/journal.py:92
  • Using a mutable default (context={}) will leak state between requests (shared dict across calls).
    twisted/twisted_site/views/client/journal.py:174
  • Using a mutable default (context={'success': False}) will leak state between requests; also the default success value should be initialized per-call.
  • Files reviewed: 107/117 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +101 to +103
if project.project_type == 'software':
return redirect('fr.projects.journals.new.hackatime')

Comment thread twisted/twisted_site/views/client/journal.py
Comment thread twisted/twisted_site/views/client/project.py
Comment on lines +67 to +74
required_content_length = reduced_minutes // 3
if content_length < min(100, required_content_length):
return self.get(
request,
id,
info=f"Content length must be more than 20 characters per hour!<br>({content_length} of {required_content_length} required)",
context={"content": content},
)
Comment on lines +153 to +159
if content_length < min(100, time_logged * 2):
return self.get(
request,
id,
info=f"Content length must be more than 120 characters per hour!<br>({len(content)} of {time_logged} required)",
context={"content": content},
)
@Heliodex

Heliodex commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

lgtm

@Heliodex
Heliodex merged commit 92eac3b into prod Sep 8, 2026
6 checks passed
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.

10 participants