Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add impressions worker #3972

Merged
merged 2 commits into from Nov 8, 2023
Merged

feat: add impressions worker #3972

merged 2 commits into from Nov 8, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Nov 8, 2023

  • feat: remove old impressions that updates state yikes
  • feat: add impressions worker

What does this PR do?

🤖 Generated by Copilot at ac792d4

This pull request simplifies the web app components by removing unused code and state, and improves the impressions tracking feature by replacing the WebSocket logic with a service worker. It also adds a new impressions worker package that handles the ingestion of impressions data into the Clickhouse database, and updates the documentation and configuration accordingly.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at ac792d4

  • Rename postsEndpoint to impressionsEndpoint and update its value in impressions.js (link)
  • Remove useLeafwatchStore and setViewedPublication from various components and use navigator.serviceWorker.controller.postMessage instead to send visible publications to the service worker (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Delete useLeafwatchStore.ts as it is no longer used (link)
  • Remove impressions service port and add impressions worker port to ports.md (link, link)
  • Rename .env.example to .dev.vars.example in impressions worker package (link)
  • Remove ignorePatterns from .eslintrc.js in impressions worker package (link)
  • Delete .gitignore in impressions worker package as it is redundant (link)
  • Add README.md to impressions worker package with introduction and schema (link)
  • Modify package.json in impressions worker package with name, scripts, dependencies, and devDependencies (link)
  • Delete app.ts in impressions worker package as it is unnecessary (link)
  • Add ingest.ts to impressions worker package with handler function for /ingest endpoint (link)
  • Add buildRequest.ts to impressions worker package with helper function to build custom request object (link)
  • Add index.ts to impressions worker package with main entry point and fetch function (link)
  • Delete ingestImpression.ts in impressions worker package as it is replaced by ingest.ts (link)

Emoji

🚀🧹🛠️

Copy link

vercel bot commented Nov 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Nov 8, 2023 7:49am
web ✅ Ready (Inspect) Visit Preview Nov 8, 2023 7:49am

Copy link

height bot commented Nov 8, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@bigint bigint merged commit 71473bb into main Nov 8, 2023
5 of 8 checks passed
@bigint bigint deleted the new-impressions branch November 8, 2023 07:43
@vercel vercel bot temporarily deployed to Preview – prerender November 8, 2023 07:44 Inactive
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.

None yet

1 participant