Skip to content

feat: add cookie consent banner#45

Merged
ideav merged 3 commits intomainfrom
issue-43-aae4e9bc5006
Apr 3, 2026
Merged

feat: add cookie consent banner#45
ideav merged 3 commits intomainfrom
issue-43-aae4e9bc5006

Conversation

@konard
Copy link
Copy Markdown
Collaborator

@konard konard commented Apr 3, 2026

Summary

Adds a cookie consent banner as requested in #43, modeled after the implementation in ideav/crm start.html.

  • New CookieConsent component (src/components/CookieConsent.tsx) renders a fixed bottom bar with the Russian-language consent message and an "Принять" (Accept) button
  • On first visit the banner is visible; clicking "Принять" stores cookie_consent=1 in localStorage and hides the banner permanently
  • Matches the reference logic exactly: localStorage.getItem('cookie_consent') check on mount, localStorage.setItem on accept
  • Styled with Tailwind CSS to match the existing design system (light/dark mode support, blue accent button)

How to reproduce the original behaviour

  1. Open the site in a browser with no prior localStorage entry for cookie_consent
  2. Cookie banner appears at the bottom of the page
  3. Click "Принять" → banner disappears and the key is persisted in localStorage
  4. Refresh → banner is gone

Fixes #43


This PR was created automatically by the AI issue solver

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #43
@konard konard self-assigned this Apr 3, 2026
Adds a cookie consent banner that appears at the bottom of the page on first visit. On acceptance, the choice is stored in localStorage and the banner is dismissed. Matches the reference implementation from ideav/crm.

Fixes #43

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Добавь сообщение про cookie, как сделано здесь https://github.com/ideav/crm/blob/main/start.html feat: add cookie consent banner Apr 3, 2026
@konard konard marked this pull request as ready for review April 3, 2026 04:36
@konard
Copy link
Copy Markdown
Collaborator Author

konard commented Apr 3, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $0.603433
  • Calculated by Anthropic: $0.603433 USD
  • Difference: $0.000000 (+0.00%)

📊 Context and tokens usage:

  • Max context window: 34.3K / 1M input tokens (3%)
  • Max output tokens: 9.5K / 64K output tokens (15%)

Total input tokens: 59.8K + 787.2K cached
Total output tokens: 9.5K output
Cost: $0.603433

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: sonnet
  • Model: Claude Sonnet 4.6 (claude-sonnet-4-6)

📎 Log file uploaded as Gist (595KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Collaborator Author

konard commented Apr 3, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • No CI/CD checks are configured for this repository
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@ideav ideav merged commit 93f4689 into main Apr 3, 2026
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.

Добавь сообщение про cookie, как сделано здесь https://github.com/ideav/crm/blob/main/start.html

2 participants