From cb14a74134eff22b8f107a8c5bd1b77feac16347 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:07:05 +0000 Subject: [PATCH 1/3] feat(pwa): restore the service worker on Angular 21 with provideServiceWorker Co-Authored-By: danial.asaria --- angular.json | 5 +++-- ngsw-config.json | 2 +- package-lock.json | 20 ++++++++++++++++++++ package.json | 1 + src/app/app.config.ts | 12 +++++++++++- src/index.html | 2 -- 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/angular.json b/angular.json index fb9cb094f..dbf529bd4 100644 --- a/angular.json +++ b/angular.json @@ -51,7 +51,8 @@ "maximumError": "16kB" } ], - "outputHashing": "all" + "outputHashing": "all", + "serviceWorker": "ngsw-config.json" }, "development": { "optimization": false, @@ -79,4 +80,4 @@ } } } -} \ No newline at end of file +} diff --git a/ngsw-config.json b/ngsw-config.json index 23720c348..fea3831ab 100644 --- a/ngsw-config.json +++ b/ngsw-config.json @@ -11,7 +11,7 @@ "/index.html", "/*.css", "/*.js", - "/manifest.webmanifest" + "/manifest.json" ] } }, { diff --git a/package-lock.json b/package-lock.json index ffcb510ef..a22c47781 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@angular/forms": "^21.2.0", "@angular/platform-browser": "^21.2.0", "@angular/router": "^21.2.0", + "@angular/service-worker": "^21.2.26", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.16.0" @@ -604,6 +605,25 @@ "rxjs": "^6.5.3 || ^7.4.0" } }, + "node_modules/@angular/service-worker": { + "version": "21.2.26", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-21.2.26.tgz", + "integrity": "sha512-9TzhpMrhdkpSXjMhp3W4TYnvLvI6yK/Q8Z2mSUsD5r5XhocnnGyIlSQNhYggnM5YVwYyC5kU2njs/b5HUFSdkw==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "bin": { + "ngsw-config": "ngsw-config.js" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "@angular/core": "21.2.26", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, "node_modules/@asamuzakjp/css-color": { "version": "5.1.11", "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", diff --git a/package.json b/package.json index 90a75d29f..12974c48f 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@angular/forms": "^21.2.0", "@angular/platform-browser": "^21.2.0", "@angular/router": "^21.2.0", + "@angular/service-worker": "^21.2.26", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.16.0" diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 61e2def36..a974703ce 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,6 +1,12 @@ -import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core'; +import { + ApplicationConfig, + isDevMode, + provideBrowserGlobalErrorListeners, + provideZoneChangeDetection, +} from '@angular/core'; import { provideHttpClient, withFetch } from '@angular/common/http'; import { provideRouter, withComponentInputBinding } from '@angular/router'; +import { provideServiceWorker } from '@angular/service-worker'; import { routes } from './app.routes'; @@ -10,5 +16,9 @@ export const appConfig: ApplicationConfig = { provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes, withComponentInputBinding()), provideHttpClient(withFetch()), + provideServiceWorker('ngsw-worker.js', { + enabled: !isDevMode(), + registrationStrategy: 'registerWhenStable:30000', + }), ], }; diff --git a/src/index.html b/src/index.html index 83b5cba73..f0f45d811 100644 --- a/src/index.html +++ b/src/index.html @@ -48,8 +48,6 @@ #skip a { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; } #skip a:focus { position:static; width:auto; height:auto; } - - From ba6cb7d9a28c8ea443867f0d3edda2c35124fa63 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:07:05 +0000 Subject: [PATCH 2/3] test(parity): Playwright parity suite for legacy (Angular 9) and angular21 Co-Authored-By: danial.asaria --- .gitignore | 1 + parity/.gitignore | 4 + parity/README.md | 62 +++ parity/fixtures.ts | 88 ++++ parity/fixtures/ask-1.json | 167 ++++++++ parity/fixtures/item-50519231.json | 532 +++++++++++++++++++++++++ parity/fixtures/jobs-1.json | 360 +++++++++++++++++ parity/fixtures/newest-1.json | 362 +++++++++++++++++ parity/fixtures/news-1.json | 362 +++++++++++++++++ parity/fixtures/news-2.json | 360 +++++++++++++++++ parity/fixtures/show-1.json | 360 +++++++++++++++++ parity/fixtures/user-harrisonpage.json | 7 + parity/package-lock.json | 76 ++++ parity/package.json | 17 + parity/playwright.config.ts | 45 +++ parity/scripts/serve-angular21.sh | 18 + parity/scripts/serve-legacy.sh | 25 ++ parity/scripts/static-server.js | 36 ++ parity/specs/feeds.spec.ts | 91 +++++ parity/specs/pwa.spec.ts | 45 +++ parity/specs/settings.spec.ts | 86 ++++ parity/specs/story.spec.ts | 84 ++++ parity/specs/user.spec.ts | 19 + parity/tsconfig.json | 13 + 24 files changed, 3220 insertions(+) create mode 100644 parity/.gitignore create mode 100644 parity/README.md create mode 100644 parity/fixtures.ts create mode 100644 parity/fixtures/ask-1.json create mode 100644 parity/fixtures/item-50519231.json create mode 100644 parity/fixtures/jobs-1.json create mode 100644 parity/fixtures/newest-1.json create mode 100644 parity/fixtures/news-1.json create mode 100644 parity/fixtures/news-2.json create mode 100644 parity/fixtures/show-1.json create mode 100644 parity/fixtures/user-harrisonpage.json create mode 100644 parity/package-lock.json create mode 100644 parity/package.json create mode 100644 parity/playwright.config.ts create mode 100755 parity/scripts/serve-angular21.sh create mode 100755 parity/scripts/serve-legacy.sh create mode 100644 parity/scripts/static-server.js create mode 100644 parity/specs/feeds.spec.ts create mode 100644 parity/specs/pwa.spec.ts create mode 100644 parity/specs/settings.spec.ts create mode 100644 parity/specs/story.spec.ts create mode 100644 parity/specs/user.spec.ts create mode 100644 parity/tsconfig.json diff --git a/.gitignore b/.gitignore index 65c447560..ef19e0cfd 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ Thumbs.db # Angular cache /.angular/cache +/.parity-legacy diff --git a/parity/.gitignore b/parity/.gitignore new file mode 100644 index 000000000..e1e542133 --- /dev/null +++ b/parity/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +test-results/ +report/html/ +report/screenshots/ diff --git a/parity/README.md b/parity/README.md new file mode 100644 index 000000000..219df795a --- /dev/null +++ b/parity/README.md @@ -0,0 +1,62 @@ +# Parity suite (Playwright) + +The same specs run against both apps and check what a user sees: + +| Project | App | URL | Node | +|---|---|---|---| +| `legacy` | Angular 9, branch `master` (production build) | http://localhost:4000 | 14 | +| `angular21` | Angular 21, this branch (production build) | http://localhost:4200 | 24 | + +| Spec | Covers | +|---|---| +| `specs/feeds.spec.ts` | news list (30 stories, points, author, comment count), More/Prev pagination, header nav (new/show/ask/jobs), jobs header, logo link | +| `specs/story.spec.ts` | story page from the feed, title/domain/points/author, full comment tree, collapse/expand, author link to profile | +| `specs/user.spec.ts` | user profile: id, karma, account age, about | +| `specs/settings.spec.ts` | settings popup, theme toggle (Default/Night/AMOLED) persisted across reload, open links in new tab, font size and list spacing | +| `specs/pwa.spec.ts` | web app manifest, `ngsw.json`, `ngsw-worker.js` registered and the app shell loading offline | + +## Run + +```bash +cd parity +nvm use 24 +npm ci +npx playwright install chromium + +npx playwright test # both projects +npx playwright test --project=legacy # Angular 9 only +npx playwright test --project=angular21 # Angular 21 only +npx playwright show-report report/html +``` + +Playwright starts the servers it needs (`scripts/serve-legacy.sh`, `scripts/serve-angular21.sh`) and reuses +any already listening on 4000/4200: + +- `serve-legacy.sh` checks out `origin/master` into `../.parity-legacy` (git worktree, ignored), switches to + Node 14 with nvm, installs, runs `ng build --prod` and serves `dist/angular-hnpwa` on 4000. + Set `LEGACY_DIR` to reuse an existing master checkout, `REBUILD=1` to force a rebuild. +- `serve-angular21.sh` switches to Node 24, runs `ng build` (production, service worker included) and serves + `dist/angular-hnpwa/browser` on 4200. + +Both are served by `scripts/static-server.js` (no dependencies, SPA fallback). `PARITY_NO_SERVER=1` skips +starting servers; `LEGACY_PORT` / `ANGULAR21_PORT` change the ports. + +## Data + +By default every Hacker News API call (`node-hnapi.herokuapp.com`, `api.hnpwa.com`) is answered from +`fixtures/`, recorded from the live API, so both apps render the same stories and the specs assert exact +text. `PARITY_LIVE=1` uses the live API instead (story assertions are skipped, the rest check shape only). + +`node-hnapi` no longer serves `/user/:id`, so the legacy profile page is broken against the live API. In live +mode the suite forwards that call to `api.hnpwa.com/v0/user/:id.json` (same JSON shape, the endpoint the +Angular 21 app uses); with fixtures both URLs return the same recorded user. + +Service workers are blocked in every spec except `pwa.spec.ts`, so the API mocks always apply. + +Full-page screenshots of every test end up in `report/screenshots//` for side-by-side review. + +## Expected state + +`legacy` is fully green. On `angular21`, specs for features that are still placeholders on +`devin/angular21-base` (feeds, story page, user profile, header/settings) fail until those feature PRs merge; +`pwa.spec.ts` passes. diff --git a/parity/fixtures.ts b/parity/fixtures.ts new file mode 100644 index 000000000..3e9e9b8d5 --- /dev/null +++ b/parity/fixtures.ts @@ -0,0 +1,88 @@ +import { test as base, expect, type BrowserContext, type Route } from '@playwright/test'; +import { existsSync, readFileSync } from 'node:fs'; +import { join } from 'node:path'; + +// By default every Hacker News API call is answered from fixtures/ (recorded from the live API), +// so both apps render identical data and the specs can assert exact text. +// PARITY_LIVE=1 hits the live API instead. +export const live = !!process.env.PARITY_LIVE; +const fixturesDir = join(__dirname, 'fixtures'); + +export function fixture(name: string): T { + return JSON.parse(readFileSync(join(fixturesDir, `${name}.json`), 'utf8')); +} + +const cors = { 'access-control-allow-origin': '*' }; + +// node-hnapi: /news?page=1, /item/1, /user/pg. HNPWA: /v0/news/1.json, /v0/item/1.json, /v0/user/pg.json +function fixtureNameFor(url: URL): string | undefined { + const parts = url.pathname + .replace(/^\/v0/, '') + .replace(/\.json$/, '') + .split('/') + .filter(Boolean); + if (parts.length === 1) return `${parts[0]}-${url.searchParams.get('page') ?? 1}`; + if (parts.length === 2) return `${parts[0]}-${parts[1]}`; + return undefined; +} + +async function answerFromFixtures(route: Route): Promise { + const name = fixtureNameFor(new URL(route.request().url())); + const file = name && join(fixturesDir, `${name}.json`); + if (file && existsSync(file)) { + await route.fulfill({ + status: 200, + headers: cors, + contentType: 'application/json', + body: readFileSync(file, 'utf8'), + }); + } else { + await route.fulfill({ + status: 404, + headers: cors, + contentType: 'application/json', + body: '{"error":"no fixture"}', + }); + } +} + +// node-hnapi dropped /user/:id; the legacy app still calls it, so live runs send it to HNPWA (same shape). +async function legacyUserToHnpwa(route: Route): Promise { + const id = new URL(route.request().url()).pathname.split('/').pop(); + const response = await route.fetch({ url: `https://api.hnpwa.com/v0/user/${id}.json` }); + await route.fulfill({ response, headers: { ...response.headers(), ...cors } }); +} + +export async function routeHackerNewsApi(context: BrowserContext): Promise { + if (live) { + await context.route('https://node-hnapi.herokuapp.com/user/**', legacyUserToHnpwa); + return; + } + await context.route('https://node-hnapi.herokuapp.com/**', answerFromFixtures); + await context.route('https://api.hnpwa.com/**', answerFromFixtures); +} + +export const test = base.extend<{ hnApi: void }>({ + hnApi: [ + async ({ context }, use) => { + await routeHackerNewsApi(context); + await use(); + }, + { auto: true }, + ], +}); + +test.afterEach(async ({ page }, testInfo) => { + const name = testInfo.titlePath + .slice(1) + .join(' - ') + .replace(/[^\w-]+/g, '_'); + await page + .screenshot({ + path: join(__dirname, 'report', 'screenshots', testInfo.project.name, `${name}.png`), + fullPage: true, + }) + .catch(() => undefined); +}); + +export { expect }; diff --git a/parity/fixtures/ask-1.json b/parity/fixtures/ask-1.json new file mode 100644 index 000000000..6d0804b21 --- /dev/null +++ b/parity/fixtures/ask-1.json @@ -0,0 +1,167 @@ +[ + { + "id": 50558285, + "title": "Ask HN: How do you manage the curse of rabbit hole?", + "points": 4, + "user": "BOOSTERHIDROGEN", + "time": 1795083716, + "time_ago": "4 hours ago", + "comments_count": 4, + "type": "ask", + "url": "item?id=50558285" + }, + { + "id": 50520076, + "title": "Ask HN: If AI tools are so good, why isn't your bug backlog empty?", + "points": 103, + "user": "ex-aws-dude", + "time": 1794849628, + "time_ago": "3 days ago", + "comments_count": 114, + "type": "ask", + "url": "item?id=50520076" + }, + { + "id": 50554381, + "title": "Ask HN: Cheapest CPU Vms", + "points": 13, + "user": "mrkn1", + "time": 1795048218, + "time_ago": "13 hours ago", + "comments_count": 8, + "type": "ask", + "url": "item?id=50554381" + }, + { + "id": 50554686, + "title": "Ask HN: When does your app need its own UI vs. using it via MCP?", + "points": 6, + "user": "amoorthy", + "time": 1795050260, + "time_ago": "13 hours ago", + "comments_count": 6, + "type": "ask", + "url": "item?id=50554686" + }, + { + "id": 50555002, + "title": "Ask HN: Tips for transitioning from web development to embedded/firmware?", + "points": 3, + "user": "llmblockchain", + "time": 1795052265, + "time_ago": "12 hours ago", + "comments_count": 4, + "type": "ask", + "url": "item?id=50555002" + }, + { + "id": 50542361, + "title": "Interesting Learnings Working for a Startup", + "points": 18, + "user": "Jessiejia11", + "time": 1794981157, + "time_ago": "a day ago", + "comments_count": 5, + "type": "link", + "url": "item?id=50542361" + }, + { + "id": 50551501, + "title": "Developing Browser Extensions", + "points": 3, + "user": "LayerTake", + "time": 1795032721, + "time_ago": "18 hours ago", + "comments_count": 3, + "type": "link", + "url": "item?id=50551501" + }, + { + "id": 50554756, + "title": "Tell HN: /tmp is hogging your RAM on Ubuntu 26", + "points": 7, + "user": "boldi", + "time": 1795050786, + "time_ago": "13 hours ago", + "comments_count": 2, + "type": "link", + "url": "item?id=50554756" + }, + { + "id": 50543947, + "title": "Claude Gets Hella Paranoid", + "points": 18, + "user": "noduerme", + "time": 1794993898, + "time_ago": "a day ago", + "comments_count": 11, + "type": "link", + "url": "item?id=50543947" + }, + { + "id": 50553802, + "title": "I open-sourced an AI loop for RISC-V CPU design months prior to OpenAI", + "points": 9, + "user": "fsbonetto", + "time": 1795044390, + "time_ago": "15 hours ago", + "comments_count": 1, + "type": "link", + "url": "item?id=50553802" + }, + { + "id": 50417407, + "title": "Ask HN: What are you working on? (November 2026)", + "points": 305, + "user": "david927", + "time": 1794172820, + "time_ago": "11 days ago", + "comments_count": 1110, + "type": "ask", + "url": "item?id=50417407" + }, + { + "id": 50548343, + "title": "Ask HN: How do you reach the flow with vibe coding?", + "points": 5, + "user": "varlock", + "time": 1795019497, + "time_ago": "21 hours ago", + "comments_count": 10, + "type": "ask", + "url": "item?id=50548343" + }, + { + "id": 50548260, + "title": "Ask HN: How do you use AI to get more relevant content?", + "points": 4, + "user": "anoojb", + "time": 1795019134, + "time_ago": "a day ago", + "comments_count": 4, + "type": "ask", + "url": "item?id=50548260" + }, + { + "id": 50542948, + "title": "Codeberg seems to have vanished from DNS", + "points": 58, + "user": "samip537", + "time": 1794986937, + "time_ago": "a day ago", + "comments_count": 21, + "type": "link", + "url": "item?id=50542948" + }, + { + "id": 50537206, + "title": "Ask HN: Are We in a Cyberwar?", + "points": 14, + "user": "bhartzer", + "time": 1794945341, + "time_ago": "2 days ago", + "comments_count": 22, + "type": "ask", + "url": "item?id=50537206" + } +] diff --git a/parity/fixtures/item-50519231.json b/parity/fixtures/item-50519231.json new file mode 100644 index 000000000..c30f4d55c --- /dev/null +++ b/parity/fixtures/item-50519231.json @@ -0,0 +1,532 @@ +{ + "id": 50519231, + "title": "Garage Door Spam", + "points": 158, + "user": "harrisonpage", + "time": 1794845616, + "time_ago": "3 days ago", + "type": "link", + "url": "https://blog.harrison.page/garage-door-spam/", + "domain": "blog.harrison.page", + "comments": [ + { + "id": 50558842, + "level": 0, + "user": "wallst07", + "time": 1795088240, + "time_ago": "2 hours ago", + "content": "

Apps for devices that I purchased that show ads is probably one of my biggeset tech pet peeves.

I will sell/replace/throw every device if I see a ad in the ecosystem. Almost every IOT manufacturer does this crap so it gets more difficult. Moving the device to Home Assistant helps a little.

Ecobee you're next, and I hope you go down in flames having such crap software.", + "comments": [ + { + "id": 50560103, + "level": 1, + "user": "deadnomore", + "time": 1795096273, + "time_ago": "6 minutes ago", + "content": "

This is why I see no point paying for streaming services that also insert ads. I\u2019ll gladly pirate and feel zero shame or remorse.", + "comments": [] + }, + { + "id": 50558951, + "level": 1, + "user": "avaer", + "time": 1795089171, + "time_ago": "2 hours ago", + "content": "

It's the hijacking of notifications that gets me the most. App store providers should ban any application that puts ads there.

Also would be nice to have a law making ads and payment mutually exclusive. Otherwise the future is one where all products evolve to have both.

The "free market" cannot solve this in a world where products can be (and are) rugpulled to have ads anytime.", + "comments": [ + { + "id": 50559212, + "level": 2, + "user": "zf00002", + "time": 1795091160, + "time_ago": "2 hours ago", + "content": "

My bank sends me emails that are ads for their other services but I guess if they mention my account and claim the email is for account purposes or something they get to claim it's not spam and I can't unsubscribe.", + "comments": [ + { + "id": 50559584, + "level": 3, + "user": "wilkystyle", + "time": 1795093557, + "time_ago": "an hour ago", + "content": "

100%. I heavily leverage Gmail filters for this and it works very well most of the time.", + "comments": [] + } + ] + }, + { + "id": 50559189, + "level": 2, + "user": "steve_taylor", + "time": 1795091022, + "time_ago": "2 hours ago", + "content": "

Apple used to forbid marketing notifications, but they relaxed their policy a while ago.

What's really needed is system-wide notification channels, a hard requirement on app developers that marketing notifications go into the marketing channel, per-channel notification permissions, and a global off-switch for marketing channel notifications.

Apple needs to break this shitty business model. There's no incentive for Apple to keep allowing it.", + "comments": [ + { + "id": 50559248, + "level": 3, + "user": "kalleboo", + "time": 1795091414, + "time_ago": "an hour ago", + "content": "

They relaxed their policy because they themselves were doing it and it seemed too hypocritical even for them", + "comments": [] + } + ] + }, + { + "id": 50559970, + "level": 2, + "user": "ubermonkey", + "time": 1795095636, + "time_ago": "17 minutes ago", + "content": "

>hijacking of notifications

This is why I don't let DoorDash send notifications. I just have to watch the app for our delivery, bc if I let them ping me it's a nonstop stream of advertising.", + "comments": [] + }, + { + "id": 50559518, + "level": 2, + "user": "jhowar59", + "time": 1795093069, + "time_ago": "an hour ago", + "content": "

Add the US Postal serverice and their 'Informed Delivery' to this list of organizations using notifications of mail that turn out to be ads.", + "comments": [ + { + "id": 50559565, + "level": 3, + "user": "trollbridge", + "time": 1795093395, + "time_ago": "an hour ago", + "content": "

Eh, it\u2019s just notifications of mail without alteration of the content of that mail. Not really the same thing.", + "comments": [ + { + "id": 50559635, + "level": 4, + "user": "jhowar59", + "time": 1795093900, + "time_ago": "an hour ago", + "content": "

It's digital flyers that aren't actually part of my physical mail. Just advertising.", + "comments": [] + } + ] + } + ] + }, + { + "id": 50559110, + "level": 2, + "user": "euroderf", + "time": 1795090428, + "time_ago": "2 hours ago", + "content": "

> Also would be nice to have a law making ads and payment mutually exclusive.

Likewise for online content. Hello, New York Times. Et al.", + "comments": [ + { + "id": 50559152, + "level": 3, + "user": "bookofjoe", + "time": 1795090698, + "time_ago": "2 hours ago", + "content": "

I pay plenty for a New York Times subscription and the content is riddled with huge ads.

Today's front page screenshot 3 minutes ago:

https://imgur.com/a/1hgKeKf", + "comments": [ + { + "id": 50559506, + "level": 4, + "user": "MPSimmons", + "time": 1795092995, + "time_ago": "an hour ago", + "content": "

To be fair, this isn't new. It's as old as newspapers themselves.", + "comments": [ + { + "id": 50559592, + "level": 5, + "user": "bookofjoe", + "time": 1795093601, + "time_ago": "an hour ago", + "content": "

True, but ads are a LOT less annoying when they're printed on paper.", + "comments": [] + } + ] + } + ] + } + ] + } + ] + }, + { + "id": 50559960, + "level": 1, + "user": "ubermonkey", + "time": 1795095584, + "time_ago": "18 minutes ago", + "content": "

Years ago, the combination of my forgetfulness and our urban address led to some thefts -- turns out, the garage is far more secure if you remember to close it.

I looked around for some kind of device that would close it automatically, which apparently doesn't exist -- with good reason, honestly. What I found was a weird little IoT box that functioned as a garage door opener, and which I could configure with an app on my phone to yell at us (via notifications) if we left the door open for more than 5 minutes.

An unsought side benefit that nevertheless became handy was that we could now control the garage door with our phones.

That app was, initially, pretty straightforward and clean -- but over time, fucking ADS crept in. I was about ready to shift platforms to avoid that crap when we moved across the country. We lived in our new place first in a rental while we house-hunted, so I did nothing there, but I absolutely planned to find an ad-free owner-respecting platform for my garage needs in the new house.

Except, well, the house we bought had (has) a pretty dang new opener, and it's delightfully almost-silent, and it has the MyQ stuff built in already. So I'm right back where I started, cursing these craven weasels every time I use the app to get into the garage.

Somewhat ironically, though, our need for this tool has flipped. Now we live in a very secure neighborhood -- kids leave their bikes on their front lawns, etc -- so the "yell at me if I leave it open" function isn't as important. OTOH, since I haven't been able to find a suitable garage door opener that will mount cleanly on my motorcycles, using the phone to get into the garage has become the default.", + "comments": [] + }, + { + "id": 50559391, + "level": 1, + "user": "tiew9Vii", + "time": 1795092342, + "time_ago": "an hour ago", + "content": "

Have a ceiling fan, it also supports smart control via Tuya.

It\u2019s disturbing opening Tuya, to control the fan, only to often have to scroll past a big ad for Temu dildos and sex toys!

Nothing against dildos and sex toys but I don\u2019t want to see them to use my ceiling fan and the ad profiling must be pretty terrible for a middle aged bloke with no browsing history of dildos and sex toys, trying to turn a fan on, not the misses.

Luckily I can mostly use the home assistant integration but still need to use Tuya for the sleep timer functionality.

Also waiting for the day the smart control stops working as the app shustdown. Specifically purchased the fan as it\u2019s a dc fan with wall controller and smart controls was supplemental to that so not the end of the world but would it be if I purchased it for the smart controls was.", + "comments": [ + { + "id": 50559937, + "level": 2, + "user": "zzygan", + "time": 1795095468, + "time_ago": "20 minutes ago", + "content": "

I have a fan device as well that\u2019s basically the same thing, used Claude to hack local Tuya to make sleep timers and color light dimming work without the cloud integration. Side effect is also that it\u2019s instantaneous rather than super laggy like it was with cloud.", + "comments": [] + } + ] + }, + { + "id": 50559150, + "level": 1, + "user": "jareklupinski", + "time": 1795090681, + "time_ago": "2 hours ago", + "content": "

the noise i made after setting up my pihole and seeing an ad for some Apple Service Subscription inside the _Settings_ app

"it's gotten inside the code! run!"", + "comments": [] + } + ] + }, + { + "id": 50560092, + "level": 0, + "user": "variety8675", + "time": 1795096232, + "time_ago": "7 minutes ago", + "content": "

Chamberlain made a new protocol that breaks the ability to do this with their new openers. They\u2019ll get away with it too because there\u2019s not many options for garage door openers and most people just buy whatever the contractor installs", + "comments": [ + { + "id": 50560153, + "level": 1, + "user": "cogman10", + "time": 1795096554, + "time_ago": "2 minutes ago", + "content": "

What a horrible horrible company.

It's a garage door opener it has two modes, opening and closing. The fact that they have an app you have to sign in to and provide your email to and they are actively stopping integration with the likes of Home assistant to make you use their horrible app is just absurd.

I shouldn't be getting spam because my garage door is selling my private data.", + "comments": [] + } + ] + }, + { + "id": 50559270, + "level": 0, + "user": "dj68k", + "time": 1795091579, + "time_ago": "an hour ago", + "content": "

Chalk me up to another happy user of Ratgdo. I got one of the older ESP8266-based ones whose Homekit firmware has been in "maintenance mode" by the developer due to its board having limited RAM and processing power to do the things they're doing with the current boards. That was a bummer to find out since I'd had the thing for less than a year and I was using the "dry contact" system: manually wired magnetic switches on the door to tell the board whether the door is up, down, or in a state between (opening or closing). It's a very, very old garage door opener.

Since the code was put in a "best-effort basis" for future updates, it's gone from version 2.2 to 2.2.6 with numerous fixes. Most notable was software-configurable "debounce" functionality which finally solved my problem with the door tripping the magnetic reed switches several times quickly when the door comes to a stop and confusing the board about its current up/down status.

I bring it up because I have tremendous enthusiasm for people who take an idea, a cheap microcontroller, and put together a solution for people who prefer to stick with older, simple appliances but still want some sort of smart functionality. People who "make cool stuff and put it on the internet." That the creator disclosed that he's putting his focus on the newer boards and will maintain/fix issues with the older ones on a "best-effort" and then actually does it... it's fantastic. Because of this continued support and fixes, I can't recommend Ratgdo boards enough.", + "comments": [ + { + "id": 50559300, + "level": 1, + "user": "atonse", + "time": 1795091720, + "time_ago": "an hour ago", + "content": "

Had the same issue (the original ratgdo being unstable) and I finally just got the ratgdo32 and it's been working beautifully with HomeKit.

I wonder if someone will try to use AI to optimize the 8266 version to better handle RAM etc.", + "comments": [] + } + ] + }, + { + "id": 50560080, + "level": 0, + "user": "100percentjake", + "time": 1795096182, + "time_ago": "8 minutes ago", + "content": "

For those curious, the apparent character-spam "RATGDO" is actually an acronym for Rage Against The Garage Door Opener.", + "comments": [] + }, + { + "id": 50559855, + "level": 0, + "user": "MatekCopatek", + "time": 1795095104, + "time_ago": "26 minutes ago", + "content": "

We say this about many things in tech, but IoT really seems like an area that's long overdue for some kind of open protocol standardization. The device makers can build their services on top of it and run whatever business model they want, but they should at least be forced to give us an escape hatch.", + "comments": [ + { + "id": 50560042, + "level": 1, + "user": "hattar", + "time": 1795095986, + "time_ago": "11 minutes ago", + "content": "

Maybe I\u2019m misunderstanding, but isn\u2019t home assistant what you\u2019re describing?

https://www.home-assistant.io/", + "comments": [ + { + "id": 50560145, + "level": 2, + "user": "AntonyGarand", + "time": 1795096484, + "time_ago": "3 minutes ago", + "content": "

Home assistant is a great home that includes all of the various softwares and iot protocols from various vendors, but it's not a protocol in itself.

What OP is asking for is closer to Matter / Zigbee / Z-Wave, a protocol in which any hub can control any device: And things are getting closer to a standard with these!

That is, as long as device manufacturers actually use them and follow the specs", + "comments": [] + } + ] + } + ] + }, + { + "id": 50559788, + "level": 0, + "user": "benmorris", + "time": 1795094682, + "time_ago": "33 minutes ago", + "content": "

It wouldn't bother me one bit if apple/google banned advertisements in notifications period.", + "comments": [] + }, + { + "id": 50558972, + "level": 0, + "user": "ryandrake", + "time": 1795089305, + "time_ago": "2 hours ago", + "content": "

Pro Tip: you don\u2019t need to buy one of the very expensive official ratgdo devices, if you are adventurous and can solder. The software is free and for a few bucks and a little time in KiCad you can build yourself a PCB, solder on the ESP32 and some electronics, and you\u2019re off and running.", + "comments": [ + { + "id": 50559220, + "level": 1, + "user": "thedanbob", + "time": 1795091234, + "time_ago": "2 hours ago", + "content": "

Don't even necessarily need to solder: I upgraded my garage door with a Shelly relay, a reed switch, and ESPHome. Maybe the ratgdo devices are doing a bit more, I'm not familiar with them, but there's probably still much cheaper pre-built boards available that can do the same job.", + "comments": [ + { + "id": 50560099, + "level": 2, + "user": "100percentjake", + "time": 1795096268, + "time_ago": "6 minutes ago", + "content": "

On a chamberlain like this the ratgdo is able to give you partial open/close, light control, button feedback, etc. Have I ever needed to open my garage door to 48%? No, but I could.", + "comments": [] + } + ] + }, + { + "id": 50559146, + "level": 1, + "user": "theoreticalmal", + "time": 1795090672, + "time_ago": "2 hours ago", + "content": "

My very first tech project was a relay board, raspberry pi, and learning python. Long before AI. It was very fun", + "comments": [] + } + ] + }, + { + "id": 50559027, + "level": 0, + "user": "newguytony", + "time": 1795089897, + "time_ago": "2 hours ago", + "content": "

Ekyro smart garage door opener on Amazon. $30 and no subscription. 15 minutes to install.", + "comments": [ + { + "id": 50560133, + "level": 1, + "user": "driverdan", + "time": 1795096437, + "time_ago": "4 minutes ago", + "content": "

Still requires using a 3rd party service, sending your data to them, and their app. They could sell your data or include ads too.", + "comments": [] + } + ] + }, + { + "id": 50559775, + "level": 0, + "user": "jawns", + "time": 1795094614, + "time_ago": "34 minutes ago", + "content": "

I have myQ also, but solved this problem in a different way.

I use NextDNS, which allows me to block ads (including a lot of mobile ads) at the DNS level.

I disabled all notifications for myQ.

And I configured the garage door to auto-close at 9pm.", + "comments": [] + }, + { + "id": 50559557, + "level": 0, + "user": "pastor_williams", + "time": 1795093353, + "time_ago": "an hour ago", + "content": "

I love that ratgdo stands for "rage against the garage door opener". I bought a pair for my own garage because I wanted home assistant integration and the native garage door app disallowed that. I feel like an element of spite is in there as well. I've already paid for the machine, if you hamstring my use of it I will do what I can to cut you out of my life.", + "comments": [] + }, + { + "id": 50559772, + "level": 0, + "user": "ricardo81", + "time": 1795094595, + "time_ago": "34 minutes ago", + "content": "

Had a similar experience with a niche phone made in the UK from Wileyfox. After they entered administration all the app updates contained some funky 'add ons'", + "comments": [] + }, + { + "id": 50559663, + "level": 0, + "user": "otter-in-a-suit", + "time": 1795094020, + "time_ago": "44 minutes ago", + "content": "

Blink, the AMZN owned WiFi cameras (which, credit where credit is due, have been running flawlessly without a subscription for 5+ years for me), recently started sending me emails for "troubleshooting" a camera that's down. The "troubleshooting" is replacing the batteries. It comes with an ad to buy a specific brand of lithium batteries. On Amazon. They haven't had the audacity to send a push notification for this yet.

I have a zero tolerance policy for spam - notification permissions get taken away on the first offense, emails get marked as spam. I've had the ratgdo on eternal to-do list for a while, so this post speaks to me.", + "comments": [] + }, + { + "id": 50559637, + "level": 0, + "user": "mdarens", + "time": 1795093906, + "time_ago": "an hour ago", + "content": "

this echoes my own frustrations with the user hostility of chamberlain/myq. an added bonus is that in the app they force you to use to control the door instead of integrating with home automation standards, the video banner ads will force whatever audio you might have playing on your device to pause. they're testing the limits of hanlon's razor over there.

i've been meaning set up a dedicated domain/website just to collect complaints about this company's behavior, alternatives, workarounds for their failures like the one posted here recently [1], and importantly, laws. we need laws.

mentioned already in these comments: granular control over notifications between marketing & functional, and no circumvention by intermingling the two.\nhome automation devices may be allowed to traverse wans to offer remote control for non-vpn/sd-wan users, but should not have their core functionality _or_ initial setup depend on an internet connection.

finally, locked devices produced by companies over a some market cap or another and their subsidiaries should be required to offer a bootloader for user/open firmware after some reasonable period of time to mitigate some of the mountains of ewaste we are producing with this stuff.

1. https://news.ycombinator.com/item?id=50525260", + "comments": [] + }, + { + "id": 50560106, + "level": 0, + "user": "jjtheblunt", + "time": 1795096300, + "time_ago": "6 minutes ago", + "content": "

That\u2019s cool and i loathe the myQ ads too. No idea what idiotic marketing decision drove them, as i eagerly search regularly for alternative lifters. Like is Chamberlain the only game in Oz and Europe like in the US?", + "comments": [ + { + "id": 50560131, + "level": 1, + "user": "bluGill", + "time": 1795096428, + "time_ago": "4 minutes ago", + "content": "

Even in the US they are not the only game. They are just the biggest, but there are other options if you look for them. Don't let a tech install whatever though, you need to demand something else.", + "comments": [] + } + ] + }, + { + "id": 50559123, + "level": 0, + "user": "anticorporate", + "time": 1795090534, + "time_ago": "2 hours ago", + "content": "

I have had a MyQ-enabled garage door opener for about a month now. I wanted a dumb one, but the installer company who replaced the garage door didn't offer one. Instead, it's just sitting there, denied Bluetooth and WiFi access until I get around to hooking up the z-wave dry contact relay controller (or perhaps ratgo, but I already have a spare relay sitting around).

A few weeks ago, I noticed my Apollo-1 Air quality sensor was seeing some strange behavior in the basement. Home Assistant showed an unexplained temperature spike and humidity drop a little before 1am.

I managed to figure out from other sensors that nothing was actually awry (no spikes in draw of nearby devices, no telltale gas signatures of the water heater kicking on, no motion or CO2 indicating human or other large animal presence). Was the board malfunctioning? Fortunately the device has an internal temperature sensor and an ambient sensor which are separate. Logging confirms the temperature spike originated on the board, probably from the WiFi chip.

But, why?

It turns out, after inspecting the signal a bit more, than the MyQ was broadcasting so loudly between the WiFi and BLE, screaming for someone to talk to it, that my air sensor was having to increase its power to still be able to communicate over all the noise. Switching to a different channel for the crappy old downstairs AP fixed it, but still, c'mon!

I'm a little wary of connecting any sort of ingress/egress to my home to the network at all, even locally, but an honest appraisal of the basement is that smashing a window is probably a much bigger threat model than hacking the door opener. Or in other words, https://xkcd.com/538/", + "comments": [ + { + "id": 50559354, + "level": 1, + "user": "flexagoon", + "time": 1795092114, + "time_ago": "an hour ago", + "content": "

A thief going into your basement by hacking your garage door may not be a realistic scenario, but your garage door being hacked and used in a botnet or intercepting your traffic and injecting malware into it is very much a thing that may happen.", + "comments": [] + } + ] + }, + { + "id": 50558803, + "level": 0, + "user": "wingspar", + "time": 1795087932, + "time_ago": "2 hours ago", + "content": "

I went with a Meross MSG100hk garage door interface.\nIt works with HomeKit and I added a HomeKit automation to turn a light on/off based on door open status.", + "comments": [] + }, + { + "id": 50559556, + "level": 0, + "user": "etatester", + "time": 1795093352, + "time_ago": "an hour ago", + "content": "

I'm really, incredibly disappointed that Apple (or Google for that matter) doesn't enforce some sort of CANSPAM on notifications.

I need your business notifications, I do not need or approve of your advertising/product updates.

For my mobile OS, all notifications look the same. "AI priority" is the only attempt at this but I don't need AI priority if I have a very tight-knit circle of apps that can send notifications.

Then one important app sends me spam and I turn it off immediately.", + "comments": [ + { + "id": 50559927, + "level": 1, + "user": "htrp", + "time": 1795095429, + "time_ago": "20 minutes ago", + "content": "

those sweet sweet app store fees", + "comments": [] + } + ] + }, + { + "id": 50519232, + "level": 0, + "user": "harrisonpage", + "time": 1794845616, + "time_ago": "3 days ago", + "content": "

In which I bypass myQ for an open source solution", + "comments": [ + { + "id": 50559014, + "level": 1, + "user": "phrotoma", + "time": 1795089811, + "time_ago": "2 hours ago", + "content": "

Great post, right to the point. Love it.", + "comments": [] + } + ] + }, + { + "id": 50559499, + "level": 0, + "user": "nticompass", + "time": 1795092942, + "time_ago": "an hour ago", + "content": "

I have a Chamberlain/myQ garage door opener, but I do not own the house (it's a townhouse I am renting). This probably limits my ability to install/use Ratgdo.

I also hate the amount of ads the myQ app has, like it's pretty much nothing but ads (and reporting this to the Play Store does nothing).

Currently, my garage door opener is connected to my WiFi (on its own "IoT VLAN") because I once had to use myQ to open my garage whilst away to let my friend into the house.

Normally, I just use a "normal" garage door opener remote (and my car's built-in HomeLink buttons).", + "comments": [] + }, + { + "id": 50558706, + "level": 0, + "user": "yakshaving_jgt", + "time": 1795087263, + "time_ago": "3 hours ago", + "content": "

Ah, this is so cool.

When I eventually buy a house with my own garage, I'm totally adding the garage door to Apple Home so that I can operate it with my voice while inside my helmet on my motorcycle, and not have to take my gloves off and get the remote control out. I hadn't thought of that possibility.", + "comments": [ + { + "id": 50558902, + "level": 1, + "user": "afn", + "time": 1795088817, + "time_ago": "2 hours ago", + "content": "

They seem to have disappeared, but there was a company called Flash2Pass (later Flash To Open) that made a garage door controller activated by flashing your high beams twice. I have it on my bikes and it makes for a really seamless entry; I don't have to take my hands off the controls, and the range is long enough that the door is open by the time I ride up.

Another option: https://www.youtube.com/watch?v=d3rfaCfImwE :D", + "comments": [ + { + "id": 50559105, + "level": 2, + "user": "vocram", + "time": 1795090391, + "time_ago": "2 hours ago", + "content": "

Unluckily they discontinued making that second option.", + "comments": [] + }, + { + "id": 50559134, + "level": 2, + "user": "yakshaving_jgt", + "time": 1795090614, + "time_ago": "2 hours ago", + "content": "

That video caught me off guard!", + "comments": [] + } + ] + }, + { + "id": 50559092, + "level": 1, + "user": "HalcyonCowboy", + "time": 1795090267, + "time_ago": "2 hours ago", + "content": "

That\u2019s exactly why I setup an open source device on my older garage door. It\u2019s only accessible from my local network, and I have my appletv setup as a HomeKit hub, so I can double tap my off brand cardo to give the voice command to open the garage door on my bike. My only irritation is that each major iOS update changes the settings on condirming the command, so out of nowhere my phone will ask to be unlocked to confirm the command. Then I have to figure out what setting changed on iOS to reconfigure it again.

I also have a nodered automation setup that sends a push notification if the garage door is open for more than 30 minutes, so I don\u2019t accidentally leave the garage open overnight. Works great.", + "comments": [] + } + ] + }, + { + "id": 50558999, + "level": 0, + "user": "Scene_Cast2", + "time": 1795089634, + "time_ago": "2 hours ago", + "content": "

Out of curiosity, how's the device doing on FCC certification?

Using a pre-certified module doesn't let you bypass certification.", + "comments": [] + } + ], + "comments_count": 55 +} diff --git a/parity/fixtures/jobs-1.json b/parity/fixtures/jobs-1.json new file mode 100644 index 000000000..df2d4b525 --- /dev/null +++ b/parity/fixtures/jobs-1.json @@ -0,0 +1,360 @@ +[ + { + "id": 50545238, + "title": "Evidence (YC S21) Is Hiring", + "points": null, + "user": null, + "time": 1795003216, + "time_ago": "a day ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/evidence/jobs/1xb9PpP-founding-gtm-lead", + "domain": "ycombinator.com" + }, + { + "id": 50534429, + "title": "YC wrote software to run our internship expo \u2013 and an 8-bit SIM to show it off", + "points": null, + "user": null, + "time": 1794934824, + "time_ago": "2 days ago", + "comments_count": 0, + "type": "job", + "url": "item?id=50534429" + }, + { + "id": 50489589, + "title": "Autonomous (YC F25) is hiring MTS to build AI agents that manage your wealth", + "points": null, + "user": null, + "time": 1794603671, + "time_ago": "6 days ago", + "comments_count": 0, + "type": "job", + "url": "https://atg.science/careers", + "domain": "atg.science" + }, + { + "id": 50452404, + "title": "Tinfoil (YC P25) is hiring an applied AI security engineer in San Francisco", + "points": null, + "user": null, + "time": 1794398435, + "time_ago": "8 days ago", + "comments_count": 0, + "type": "job", + "url": "item?id=50452404" + }, + { + "id": 50428266, + "title": "Y/N (YC S23) is hiring a growth lead to distribute superhuman A.I. storytelling", + "points": null, + "user": null, + "time": 1794243606, + "time_ago": "10 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/yn/jobs/TjDn3YZ-founding-growth-marketer", + "domain": "ycombinator.com" + }, + { + "id": 50395043, + "title": "UpCodes (YC S17) is hiring SDR's to sell AI compliance software", + "points": null, + "user": null, + "time": 1793984613, + "time_ago": "13 days ago", + "comments_count": 0, + "type": "job", + "url": "https://up.codes/careers?utm_source=HN", + "domain": "up.codes" + }, + { + "id": 50391342, + "title": "Mbodi AI (YC P25) Is Hiring Research and Robotic Engineers", + "points": null, + "user": null, + "time": 1793966442, + "time_ago": "13 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/mbodi-ai/jobs", + "domain": "ycombinator.com" + }, + { + "id": 50381512, + "title": "Bild AI (YC W25) Is Hiring Founding Product Engineers", + "points": null, + "user": null, + "time": 1793898083, + "time_ago": "14 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/bild-ai/jobs", + "domain": "ycombinator.com" + }, + { + "id": 50354582, + "title": "Ashby (YC W19) Is Hiring EMs", + "points": null, + "user": null, + "time": 1793725253, + "time_ago": "16 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ashbyhq.com/careers?ashby_jid=695b1ce6-c375-4fad-94ef-61b50a3fbd28&utm_source=hn", + "domain": "ashbyhq.com" + }, + { + "id": 50350924, + "title": "Sava Trust (YC F25) Is Hiring a Founding Engineer in NYC", + "points": null, + "user": null, + "time": 1793707261, + "time_ago": "16 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/sava-trust-company/jobs", + "domain": "ycombinator.com" + }, + { + "id": 50339827, + "title": "Bitmovin (YC S15) Is Hiring Technical Graduates in Denver (Engineering/CS Focus)", + "points": null, + "user": null, + "time": 1793638841, + "time_ago": "17 days ago", + "comments_count": 0, + "type": "job", + "url": "https://bitmovin.com/careers/8660599002/", + "domain": "bitmovin.com" + }, + { + "id": 50300643, + "title": "Wasmer (YC S19) Is Hiring OS/Hypervisor Experts in Europe", + "points": null, + "user": null, + "time": 1793343635, + "time_ago": "20 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.workatastartup.com/jobs/98722", + "domain": "workatastartup.com" + }, + { + "id": 50280824, + "title": "Nango (YC W23) Is Hiring Across Eng, FDE, Marketing, DevRel", + "points": null, + "user": null, + "time": 1793221206, + "time_ago": "22 days ago", + "comments_count": 0, + "type": "job", + "url": "https://nango.dev/careers", + "domain": "nango.dev" + }, + { + "id": 50276779, + "title": "Converge (YC S23) Is Hiring a Founding Platform Engineer", + "points": null, + "user": null, + "time": 1793206824, + "time_ago": "22 days ago", + "comments_count": 0, + "type": "job", + "url": "https://www.runconverge.com/careers/founding-platform-engineer", + "domain": "runconverge.com" + }, + { + "id": 50179455, + "title": "9 Mothers (YC P26) Is Hiring in Austin, TX", + "points": null, + "user": null, + "time": 1792584024, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://9mothers.com/careers", + "domain": "9mothers.com" + }, + { + "id": 50164991, + "title": "Hazel (YC W24) Is Hiring", + "points": null, + "user": null, + "time": 1792497632, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/hazel-2/jobs/PpNKYBS-full-stack-engineer-ts-sci", + "domain": "ycombinator.com" + }, + { + "id": 50155172, + "title": "Evidence (YC S21) Is Hiring Software Engineers", + "points": null, + "user": null, + "time": 1792430493, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://evidence.dev/jobs", + "domain": "evidence.dev" + }, + { + "id": 50132839, + "title": "Artie (YC S23) Is Hiring Enterprise AES and Senior Engineers", + "points": null, + "user": null, + "time": 1792256570, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://www.artie.com/careers", + "domain": "artie.com" + }, + { + "id": 50126774, + "title": "Flexport Is Hiring a Biz Ops Leader in Office of CEO", + "points": null, + "user": null, + "time": 1792198911, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://www.flexport.com/company/careers/", + "domain": "flexport.com" + }, + { + "id": 50121188, + "title": "Piramidal (YC W24) Is Hiring", + "points": null, + "user": null, + "time": 1792170535, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://job-boards.greenhouse.io/piramidalinc/jobs/4443102009", + "domain": "job-boards.greenhouse.io" + }, + { + "id": 50078686, + "title": "PostEra (YC W20) Is Hiring AI Researchers for Drug Discovery", + "points": null, + "user": null, + "time": 1791925272, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://jobs.lever.co/postera/c7d50a36-db0a-4574-bfe4-8700b74a22c0", + "domain": "jobs.lever.co" + }, + { + "id": 50074969, + "title": "Coris (YC S22) Is Hiring Back End Engineer", + "points": null, + "user": null, + "time": 1791910839, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/coris/jobs/h0nDly8-backend-engineer-ai-native-risk-infrastructure-integrations", + "domain": "ycombinator.com" + }, + { + "id": 50042330, + "title": "Weave (YC W25) is hiring ML, AI, product, & design engineers", + "points": null, + "user": null, + "time": 1791720068, + "time_ago": "a month ago", + "comments_count": 0, + "type": "job", + "url": "https://jobs.ashbyhq.com/weave-os", + "domain": "jobs.ashbyhq.com" + }, + { + "id": 49945904, + "title": "RetailReady (YC W24) Is Hiring", + "points": null, + "user": null, + "time": 1791046812, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/retailready/jobs/bFcgIe4-implementations", + "domain": "ycombinator.com" + }, + { + "id": 49943524, + "title": "Great Question (YC W21) Is Hiring Product Engineers in Canada (Remote)", + "points": null, + "user": null, + "time": 1791028930, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/great-question/jobs/agEqBYD-product-engineer-ai-full-stack", + "domain": "ycombinator.com" + }, + { + "id": 49919680, + "title": "Truemetrics (YC S23) Is Hiring a GTM Founder's Associate", + "points": null, + "user": null, + "time": 1790848098, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/truemetrics/jobs/THLEzXI-gtm-founder-s-associate", + "domain": "ycombinator.com" + }, + { + "id": 49911531, + "title": "Bild AI (YC W25) Is Hiring a Founding Product Engineer", + "points": null, + "user": null, + "time": 1790787620, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/bild-ai/jobs/dAbC3Gd-founding-product-engineer", + "domain": "ycombinator.com" + }, + { + "id": 49834893, + "title": "Stable (YC W20) Is Hiring Product Engineers", + "points": null, + "user": null, + "time": 1790274558, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://www.usestable.com/careers/product-engineer", + "domain": "usestable.com" + }, + { + "id": 49814780, + "title": "QuestDB (YC S20) Is Hiring a Sales Engineer", + "points": null, + "user": null, + "time": 1790164864, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://questdb.com/careers/pre-sales-engineer-north-america/", + "domain": "questdb.com" + }, + { + "id": 49768220, + "title": "Supabase (YC S20) Is Hiring for OrioleDB", + "points": null, + "user": null, + "time": 1789837290, + "time_ago": "2 months ago", + "comments_count": 0, + "type": "job", + "url": "https://supabase.link/orioledbjob", + "domain": "supabase.link" + } +] diff --git a/parity/fixtures/newest-1.json b/parity/fixtures/newest-1.json new file mode 100644 index 000000000..1484ecfd7 --- /dev/null +++ b/parity/fixtures/newest-1.json @@ -0,0 +1,362 @@ +[ + { + "id": 50560117, + "title": "Tech Implementing CHERI in Gem5", + "points": 1, + "user": "chrsw", + "time": 1795096326, + "time_ago": "a few seconds ago", + "comments_count": 0, + "type": "link", + "url": "https://arxiv.org/abs/2611.24460", + "domain": "arxiv.org" + }, + { + "id": 50560098, + "title": "World Toilet Day", + "points": 1, + "user": "enjoyyourlife", + "time": 1795096266, + "time_ago": "a minute ago", + "comments_count": 0, + "type": "link", + "url": "https://www.un.org/en/observances/toilet-day", + "domain": "un.org" + }, + { + "id": 50560097, + "title": "The RedMonk Agent Activity Index, Q3 2026", + "points": 1, + "user": "mooreds", + "time": 1795096260, + "time_ago": "2 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://redmonk.com/sogrady/2026/11/18/agent-activity-index-q326/", + "domain": "redmonk.com" + }, + { + "id": 50560084, + "title": "Show HN: Detect and mask PII, payment data and secrets in logs for Go", + "points": 1, + "user": "nchika", + "time": 1795096195, + "time_ago": "3 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://github.com/nao1215/embargo", + "domain": "github.com" + }, + { + "id": 50560081, + "title": "Building a private family photo site with Claude Code", + "points": 1, + "user": "deepak_sozial", + "time": 1795096186, + "time_ago": "3 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://deepakmurugaian.substack.com/p/i-built-a-home-for-my-ride-photos", + "domain": "deepakmurugaian.substack.com" + }, + { + "id": 50560075, + "title": "Attrition: Breaking Bad", + "points": 1, + "user": "o_-_o", + "time": 1795096161, + "time_ago": "3 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://attrition.org/errata/breaking_bad/", + "domain": "attrition.org" + }, + { + "id": 50560067, + "title": "Show HN: ZXC 1.0 \u2013 Asymmetric compression codec in C, now in ClickHouse beta", + "points": 2, + "user": "pollop_", + "time": 1795096102, + "time_ago": "4 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://github.com/hellobertrand/zxc/releases/tag/v1.0.0", + "domain": "github.com" + }, + { + "id": 50560051, + "title": "Show HN: ToolJet 4.0 \u2013 vibe-code internal tools with governance", + "points": 2, + "user": "kriztle", + "time": 1795096009, + "time_ago": "6 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://tooljet.com", + "domain": "tooljet.com" + }, + { + "id": 50560050, + "title": "European Tech Founders Demand Reform", + "points": 1, + "user": "FinnLobsien", + "time": 1795096009, + "time_ago": "6 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://pathfounders.com/p/tech-founders-worth-100bn-tell-europe-to-get-its-sh-t-together", + "domain": "pathfounders.com" + }, + { + "id": 50560043, + "title": "Gemini 4 Neon has no opt-out of prompt logging", + "points": 1, + "user": "leafingensemble", + "time": 1795095988, + "time_ago": "6 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/abuse-monitoring", + "domain": "docs.cloud.google.com" + }, + { + "id": 50560040, + "title": "UK loses bid to keep Apple 'backdoor' order secret", + "points": 2, + "user": "yubblegum", + "time": 1795095980, + "time_ago": "6 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://www.ft.com/content/46a5cf3c-a827-477f-b72f-e7415565e729", + "domain": "ft.com" + }, + { + "id": 50559997, + "title": "Altar II: a mechanical keyboard designed for Mac", + "points": 2, + "user": "aemerson_", + "time": 1795095755, + "time_ago": "10 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://daringfireball.net/linked/2026/11/10/altar-ii-kickstarter", + "domain": "daringfireball.net" + }, + { + "id": 50559977, + "title": "I made a film in Excel [video]", + "points": 5, + "user": "sebg", + "time": 1795095644, + "time_ago": "12 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://vimeo.com/1241981102", + "domain": "vimeo.com" + }, + { + "id": 50559966, + "title": "A few of my favorite software documentaries", + "points": 3, + "user": "surprisetalk", + "time": 1795095615, + "time_ago": "12 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://nate.spot/software-documentaries/", + "domain": "nate.spot" + }, + { + "id": 50559957, + "title": "Java4Shell: CPU matrix and cloud instance mappings", + "points": 4, + "user": "_xor_", + "time": 1795095571, + "time_ago": "13 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://xbow.com/research/java4shell-cpu-matrix/cpu-matrix/index.html", + "domain": "xbow.com" + }, + { + "id": 50559947, + "title": "Canva Will Let Users Switch Off Most Generative AI", + "points": 3, + "user": "thm", + "time": 1795095502, + "time_ago": "14 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.engadget.com/2321318/canva-will-let-users-switch-off-most-generative-ai/", + "domain": "engadget.com" + }, + { + "id": 50559940, + "title": "Automodel: A skill for agentic model discovery", + "points": 2, + "user": "marco_virgolin", + "time": 1795095478, + "time_ago": "15 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://arxiv.org/abs/2611.24347", + "domain": "arxiv.org" + }, + { + "id": 50559919, + "title": "National Geographic Reveals Its Pictures of the Year for 2026", + "points": 2, + "user": "pryanshu89", + "time": 1795095383, + "time_ago": "16 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.nationalgeographic.com/photography/graphics/pictures-of-the-year-2026", + "domain": "nationalgeographic.com" + }, + { + "id": 50559896, + "title": "The 5k Episodes a Week AI-Podcast Company Has Pivoted", + "points": 1, + "user": "speckx", + "time": 1795095277, + "time_ago": "18 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.hollywoodreporter.com/business/digital/the-5000-episodes-a-week-ai-podcast-company-pivot-1236754759/", + "domain": "hollywoodreporter.com" + }, + { + "id": 50559891, + "title": "NHS data contract to stay with Palantir until 2029", + "points": 1, + "user": "asplake", + "time": 1795095265, + "time_ago": "18 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.bbc.co.uk/news/articles/cqvg27zpm8w8o", + "domain": "bbc.co.uk" + }, + { + "id": 50559872, + "title": "I Tested 7 Ways to Translate a WordPress Site in 2026 [video]", + "points": 1, + "user": "leoloso", + "time": 1795095193, + "time_ago": "19 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.youtube.com/watch?v=GOgbRpKeEXw", + "domain": "youtube.com" + }, + { + "id": 50559861, + "title": "Agentic Trio: 12 theses on digital product development", + "points": 2, + "user": "simonharrer", + "time": 1795095149, + "time_ago": "20 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://agentictrio.org/", + "domain": "agentictrio.org" + }, + { + "id": 50559846, + "title": "Not Out of Control: China's Cyber Campaigns", + "points": 1, + "user": "speckx", + "time": 1795095064, + "time_ago": "21 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.interface-eu.org/publications/china-cyber-ai", + "domain": "interface-eu.org" + }, + { + "id": 50559842, + "title": "MRAM Is Here: How It Changes the Game", + "points": 1, + "user": "hasheddan", + "time": 1795095041, + "time_ago": "22 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://bard0.com/insights/mram-new-deployments-2026.html", + "domain": "bard0.com" + }, + { + "id": 50559841, + "title": "Two Open Questions for Valuing Anthropic", + "points": 1, + "user": "skohan", + "time": 1795095039, + "time_ago": "22 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://medium.com/@spencerkohan/two-open-questions-for-valuing-anthropic-e529229c828e", + "domain": "medium.com" + }, + { + "id": 50559820, + "title": "Is 'fork' missing operation in sandboxes?", + "points": 2, + "user": "damezumari", + "time": 1795094923, + "time_ago": "24 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://avrea.com/blog/avrea-sandboxes-computers-should-be-forkable", + "domain": "avrea.com" + }, + { + "id": 50559794, + "title": "Artificial: Hollywood's Take on What Happened During the OpenAI Revolt (Trailer) [video]", + "points": 1, + "user": "mentalgear", + "time": 1795094728, + "time_ago": "27 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.youtube.com/watch?v=OT8J-1DO9Fw", + "domain": "youtube.com" + }, + { + "id": 50559790, + "title": "Team's marketing AI spend is about to become your problem", + "points": 1, + "user": "pakostina", + "time": 1795094708, + "time_ago": "27 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://aiforcontentmarketing.ai/marketing-ai-spend/", + "domain": "aiforcontentmarketing.ai" + }, + { + "id": 50559754, + "title": "Coordinated Snapshots of Agent State", + "points": 2, + "user": "gabrielruttner", + "time": 1795094493, + "time_ago": "31 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://hatchet.run/blog/agent-statefulness", + "domain": "hatchet.run" + }, + { + "id": 50559749, + "title": "Show HN: Foolscap \u2013 a writing app that reads your book and never writes for you", + "points": 4, + "user": "atugard", + "time": 1795094480, + "time_ago": "31 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://foolscap.works/", + "domain": "foolscap.works" + } +] diff --git a/parity/fixtures/news-1.json b/parity/fixtures/news-1.json new file mode 100644 index 000000000..c0e5b0774 --- /dev/null +++ b/parity/fixtures/news-1.json @@ -0,0 +1,362 @@ +[ + { + "id": 50558533, + "title": "How the European Commission rolled out Matrix to more than 40k staff", + "points": 254, + "user": "liotier", + "time": 1795085909, + "time_ago": "3 hours ago", + "comments_count": 106, + "type": "link", + "url": "https://element.io/blog/how-the-european-commission-rolled-out-matrix-to-more-than-40-000-staff/", + "domain": "element.io" + }, + { + "id": 50519231, + "title": "Garage Door Spam", + "points": 150, + "user": "harrisonpage", + "time": 1794845616, + "time_ago": "3 days ago", + "comments_count": 51, + "type": "link", + "url": "https://blog.harrison.page/garage-door-spam/", + "domain": "blog.harrison.page" + }, + { + "id": 50547048, + "title": "Nintendo takes Picofly firmware down from GitHub [video]", + "points": 58, + "user": "cowlevel", + "time": 1795013764, + "time_ago": "a day ago", + "comments_count": 7, + "type": "link", + "url": "https://www.youtube.com/watch?v=-TLCGUpoD6c", + "domain": "youtube.com" + }, + { + "id": 50557870, + "title": "What's New in PHP 8.6", + "points": 147, + "user": "netol", + "time": 1795080435, + "time_ago": "4 hours ago", + "comments_count": 69, + "type": "link", + "url": "https://www.php.net/releases/8.6/en.php", + "domain": "php.net" + }, + { + "id": 50556287, + "title": "Ruby2\u00dfhell: Pre-authentication RCE on stock Rails", + "points": 236, + "user": "jdns", + "time": 1795064951, + "time_ago": "9 hours ago", + "comments_count": 92, + "type": "link", + "url": "https://verialabs.com/ruby2shell/", + "domain": "verialabs.com" + }, + { + "id": 50557537, + "title": "Distributed, high-performance blob storage on SQLite", + "points": 127, + "user": "ghostfoxgod", + "time": 1795077585, + "time_ago": "5 hours ago", + "comments_count": 23, + "type": "link", + "url": "https://zerodha.tech/blog/high-performance-distributed-blob-storage/", + "domain": "zerodha.tech" + }, + { + "id": 50548808, + "title": "We taught robots to carve marble sculptures", + "points": 33, + "user": "ewiesler", + "time": 1795021433, + "time_ago": "21 hours ago", + "comments_count": 24, + "type": "link", + "url": "https://eleanorwiesler.com/blog/robotic-stone-carving/", + "domain": "eleanorwiesler.com" + }, + { + "id": 50559719, + "title": "Making 8-page foldable zines from a single A4 sheet in the browser", + "points": 17, + "user": "krthr", + "time": 1795094291, + "time_ago": "34 minutes ago", + "comments_count": 5, + "type": "link", + "url": "https://krthr.co/paper-folds-and-whats-new-in-fanzines-app/", + "domain": "krthr.co" + }, + { + "id": 50546221, + "title": "Mass launched to orbit each year by rocket builder", + "points": 31, + "user": "hubraumhugo", + "time": 1795009388, + "time_ago": "a day ago", + "comments_count": 13, + "type": "link", + "url": "https://www.kadoa.com/companies/insights/spacex-europe-payload", + "domain": "kadoa.com" + }, + { + "id": 50536950, + "title": "Oregon library dropped Dewey Decimal system, adopted bookstore-like arrangement", + "points": 41, + "user": "bookofjoe", + "time": 1794944112, + "time_ago": "2 days ago", + "comments_count": 27, + "type": "link", + "url": "https://www.fastcompany.com/91597520/oregon-library-ditched-dewey-decimal-wayfinding-system", + "domain": "fastcompany.com" + }, + { + "id": 50552424, + "title": "Gemini 4 Neon", + "points": 897, + "user": "yigitdemirag", + "time": 1795037647, + "time_ago": "16 hours ago", + "comments_count": 707, + "type": "link", + "url": "https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-neon/", + "domain": "blog.google" + }, + { + "id": 50557716, + "title": "SSD prices will start going down the second half of next year", + "points": 161, + "user": "illidan1000", + "time": 1795079134, + "time_ago": "5 hours ago", + "comments_count": 136, + "type": "link", + "url": "https://www.drivevault.io/blog/when-will-hard-drive-prices-come-down.html", + "domain": "drivevault.io" + }, + { + "id": 50547374, + "title": "Unauthenticated remote code execution in Nginx", + "points": 1443, + "user": "speedping", + "time": 1795015195, + "time_ago": "a day ago", + "comments_count": 609, + "type": "link", + "url": "https://www.wiz.io/blog/nginx-http2-rce-vulnerabilities", + "domain": "wiz.io" + }, + { + "id": 50559179, + "title": "Unblockable communication with gravity \u2013 Science Advances", + "points": 18, + "user": "rbanffy", + "time": 1795090920, + "time_ago": "2 hours ago", + "comments_count": 5, + "type": "link", + "url": "https://www.science.org/doi/10.1126/sciadv.aee0802", + "domain": "science.org" + }, + { + "id": 50558559, + "title": "Two stealth models just appeared on the leaderboard, both ahead of Fable 5.2", + "points": 28, + "user": "cheptsov", + "time": 1795086200, + "time_ago": "3 hours ago", + "comments_count": 1, + "type": "link", + "url": "https://contralabs.com/frontierdesign", + "domain": "contralabs.com" + }, + { + "id": 50556533, + "title": "15M web servers on one VM \u2013 smoltcp, DPDK, AF_XDP", + "points": 244, + "user": "fessguid", + "time": 1795067796, + "time_ago": "8 hours ago", + "comments_count": 28, + "type": "link", + "url": "https://kapteko.com/15-million-webservers/", + "domain": "kapteko.com" + }, + { + "id": 50546495, + "title": "Exponential Behavior in Magic: The Gathering", + "points": 24, + "user": "neuwirth", + "time": 1795010829, + "time_ago": "a day ago", + "comments_count": 7, + "type": "link", + "url": "https://levineuwirth.org/essays/exponential-magic/", + "domain": "levineuwirth.org" + }, + { + "id": 50559140, + "title": "The AI Superintelligence Debate Has Serious Flaws", + "points": 67, + "user": "rbanffy", + "time": 1795090630, + "time_ago": "2 hours ago", + "comments_count": 65, + "type": "link", + "url": "https://spectrum.ieee.org/ai-superintelligence-debate", + "domain": "spectrum.ieee.org" + }, + { + "id": 50544168, + "title": "C's designated initializers give us named arguments", + "points": 12, + "user": "joshcsimmons", + "time": 1794995389, + "time_ago": "a day ago", + "comments_count": 5, + "type": "link", + "url": "https://quuxplusone.github.io/blog/2026/11/16/named-arguments-in-c/", + "domain": "quuxplusone.github.io" + }, + { + "id": 50559749, + "title": "Show HN: Foolscap \u2013 a writing app that reads your book and never writes for you", + "points": 4, + "user": "atugard", + "time": 1795094480, + "time_ago": "31 minutes ago", + "comments_count": 1, + "type": "link", + "url": "https://foolscap.works/", + "domain": "foolscap.works" + }, + { + "id": 50554038, + "title": "Multiple vulnerabilities in Regexp and String case conversion", + "points": 300, + "user": "runesoerensen", + "time": 1795045970, + "time_ago": "14 hours ago", + "comments_count": 110, + "type": "link", + "url": "https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/", + "domain": "ruby-lang.org" + }, + { + "id": 50553843, + "title": "Anthropic prices initial public offering", + "points": 303, + "user": "surprisetalk", + "time": 1795044609, + "time_ago": "14 hours ago", + "comments_count": 568, + "type": "link", + "url": "https://www.anthropic.com/news/anthropic-prices-initial-public-offering", + "domain": "anthropic.com" + }, + { + "id": 50548021, + "title": "Seven new models at scalable price-performance", + "points": 569, + "user": "gmays", + "time": 1795018104, + "time_ago": "a day ago", + "comments_count": 360, + "type": "link", + "url": "https://microsoft.ai/news/microsoft-ignite-2026/", + "domain": "microsoft.ai" + }, + { + "id": 50547620, + "title": "Inside Deutsche Bank", + "points": 735, + "user": "gyre007", + "time": 1795016313, + "time_ago": "a day ago", + "comments_count": 244, + "type": "link", + "url": "https://www.inside-db.com/", + "domain": "inside-db.com" + }, + { + "id": 50558906, + "title": "Someone reported java4shell bug in September 2026", + "points": 13, + "user": "notmine1337", + "time": 1795088823, + "time_ago": "2 hours ago", + "comments_count": 1, + "type": "link", + "url": "https://github.com/openjdk/jdk/pull/32781", + "domain": "github.com" + }, + { + "id": 50512280, + "title": "The first ping from Tonga (1997)", + "points": 56, + "user": "Eric_Gullichsen", + "time": 1794787274, + "time_ago": "4 days ago", + "comments_count": 6, + "type": "link", + "url": "https://colo.to/firstping.html", + "domain": "colo.to" + }, + { + "id": 50519778, + "title": "Logitech Harmony IR code online database archive", + "points": 55, + "user": "cf100clunk", + "time": 1794848203, + "time_ago": "3 days ago", + "comments_count": 10, + "type": "link", + "url": "https://github.com/pickysysadmin/logitech-harmony-ir-archive", + "domain": "github.com" + }, + { + "id": 50541774, + "title": "Building Lego Machines to Destroy Tall Lego Towers (2024)", + "points": 24, + "user": "sammatilda", + "time": 1794975050, + "time_ago": "a day ago", + "comments_count": 3, + "type": "link", + "url": "https://kottke.org/24/07/building-lego-machines-to-destroy-tall-lego-towers", + "domain": "kottke.org" + }, + { + "id": 50553225, + "title": "LLM assisted reverse engineering", + "points": 261, + "user": "ioma8", + "time": 1795040953, + "time_ago": "15 hours ago", + "comments_count": 67, + "type": "link", + "url": "https://www.slowchronicle.com/posts/llm-assisted-reverse-engineering", + "domain": "slowchronicle.com" + }, + { + "id": 50551046, + "title": "DaisyRose-27B", + "points": 235, + "user": "de_sty", + "time": 1795030756, + "time_ago": "18 hours ago", + "comments_count": 86, + "type": "link", + "url": "https://www.radixark.com/blog/daisyrose-27b", + "domain": "radixark.com" + } +] diff --git a/parity/fixtures/news-2.json b/parity/fixtures/news-2.json new file mode 100644 index 000000000..76ecf0c96 --- /dev/null +++ b/parity/fixtures/news-2.json @@ -0,0 +1,360 @@ +[ + { + "id": 50550415, + "title": "Genie 4 is now available", + "points": 278, + "user": "leumon", + "time": 1795027791, + "time_ago": "19 hours ago", + "comments_count": 175, + "type": "link", + "url": "https://blog.google/innovation-and-ai/models-and-research/google-deepmind/genie-4-now-available-project-genie/", + "domain": "blog.google" + }, + { + "id": 50525260, + "title": "Dumping an AES key from a MyQ garage opener to stop rebooting when offline", + "points": 144, + "user": "kusha", + "time": 1794872846, + "time_ago": "3 days ago", + "comments_count": 54, + "type": "link", + "url": "https://kusha.me/blog/stop_myq_homebridge_819lmb_rebooting/", + "domain": "kusha.me" + }, + { + "id": 50548660, + "title": "Show HN: Mastra Factory, the open-source software factory we use to build Mastra", + "points": 112, + "user": "codekarate", + "time": 1795020822, + "time_ago": "21 hours ago", + "comments_count": 37, + "type": "link", + "url": "item?id=50548660" + }, + { + "id": 50546914, + "title": "The Cambridge Dictionary has named \u2018human\u2019 as the Word of the Year 2026", + "points": 294, + "user": "DeepLogin", + "time": 1795013032, + "time_ago": "a day ago", + "comments_count": 218, + "type": "link", + "url": "https://www.cam.ac.uk/news/cambridge-dictionary-reveals-word-of-the-year-2026", + "domain": "cam.ac.uk" + }, + { + "id": 50518303, + "title": "Axelera Titania Brings Native FP8 and FP4 to In-Memory Compute", + "points": 43, + "user": "muxamilian", + "time": 1794841194, + "time_ago": "3 days ago", + "comments_count": 2, + "type": "link", + "url": "https://futurumgroup.com/insights/axelera-titania-brings-native-fp8-and-fp4-to-in-memory-compute/", + "domain": "futurumgroup.com" + }, + { + "id": 50547980, + "title": "Show HN: ExitPath \u2013 Open-source ways out of Slack, Notion and Microsoft 365", + "points": 236, + "user": "zerocool0101", + "time": 1795017883, + "time_ago": "a day ago", + "comments_count": 81, + "type": "link", + "url": "https://exitpath-ruddy.vercel.app/", + "domain": "exitpath-ruddy.vercel.app" + }, + { + "id": 50548161, + "title": "Show HN: Take Voyager 1 apart, down to a single memory chip", + "points": 220, + "user": "raj-shekhar", + "time": 1795018731, + "time_ago": "a day ago", + "comments_count": 54, + "type": "link", + "url": "https://rshekhar.com/voyager/", + "domain": "rshekhar.com" + }, + { + "id": 50547583, + "title": "F-22 Next-Generation micro\u2013Data Transfer Cartridge (mDTC)", + "points": 188, + "user": "birdboat00", + "time": 1795016144, + "time_ago": "a day ago", + "comments_count": 121, + "type": "link", + "url": "https://sam.gov/workspace/contract/opp/8948e8601e964c6aba9c801eee16b1be/view", + "domain": "sam.gov" + }, + { + "id": 50542441, + "title": "Mosquitoes are Ladakh's latest tourists", + "points": 59, + "user": "akbarnama", + "time": 1794982105, + "time_ago": "a day ago", + "comments_count": 22, + "type": "link", + "url": "https://ruralindiaonline.org/article/mosquitoes-are-ladakh-s-latest-tourists", + "domain": "ruralindiaonline.org" + }, + { + "id": 50554009, + "title": "Palo Alto Networks to Acquire Applied Compute for $4.5B", + "points": 69, + "user": "alpb", + "time": 1795045753, + "time_ago": "14 hours ago", + "comments_count": 21, + "type": "link", + "url": "https://investors.paloaltonetworks.com/news-releases/news-release-details/palo-alto-networks-acquire-applied-compute-bringing-secure-open", + "domain": "investors.paloaltonetworks.com" + }, + { + "id": 50558942, + "title": "Carbon Emissions of US Data Centers Rival Countries", + "points": 14, + "user": "sandinmyjoints", + "time": 1795089061, + "time_ago": "2 hours ago", + "comments_count": 1, + "type": "link", + "url": "https://www.nytimes.com/interactive/2026/11/16/climate/ai-data-center-pollution-carbon-emissions.html", + "domain": "nytimes.com" + }, + { + "id": 50523377, + "title": "Show HN: Open-source, real-time object tracking for live video feeds", + "points": 110, + "user": "aryaman_darda", + "time": 1794863679, + "time_ago": "3 days ago", + "comments_count": 11, + "type": "link", + "url": "https://github.com/aryamandarda/tamserve", + "domain": "github.com" + }, + { + "id": 50554045, + "title": "We need smart people who give a shit", + "points": 687, + "user": "ExMachina73", + "time": 1795046029, + "time_ago": "14 hours ago", + "comments_count": 345, + "type": "link", + "url": "https://violetpixel.com/blog/2026-11-17-we-need-smart-people-who-give-a-shit/", + "domain": "violetpixel.com" + }, + { + "id": 50547777, + "title": "AI agents ask better questions than KPMG accountants in audit trial", + "points": 475, + "user": "Betelbuddy", + "time": 1795016974, + "time_ago": "a day ago", + "comments_count": 226, + "type": "link", + "url": "https://europeanbusinessmagazine.com/ai-agents-better-questions-kpmg/", + "domain": "europeanbusinessmagazine.com" + }, + { + "id": 50510385, + "title": "Cuttlefish on Mac: Android's Virtual Device Framework on Apple Silicon", + "points": 77, + "user": "acossta", + "time": 1794774642, + "time_ago": "4 days ago", + "comments_count": 15, + "type": "link", + "url": "https://engineering.fb.com/2026/11/13/android/cuttlefish-on-mac/", + "domain": "engineering.fb.com" + }, + { + "id": 50546967, + "title": "The x86 CPU: From 4004 to 486", + "points": 173, + "user": "ibobev", + "time": 1795013273, + "time_ago": "a day ago", + "comments_count": 61, + "type": "link", + "url": "https://pikuma.com/blog/history-of-x86-4004-to-486", + "domain": "pikuma.com" + }, + { + "id": 50545238, + "title": "Evidence (YC S21) Is Hiring", + "points": null, + "user": null, + "time": 1795003216, + "time_ago": "a day ago", + "comments_count": 0, + "type": "job", + "url": "https://www.ycombinator.com/companies/evidence/jobs/1xb9PpP-founding-gtm-lead", + "domain": "ycombinator.com" + }, + { + "id": 50549188, + "title": "Launch HN: Maritime (YC F26) \u2013 A managed cloud for production AI agents", + "points": 56, + "user": "ashriv", + "time": 1795022788, + "time_ago": "20 hours ago", + "comments_count": 53, + "type": "link", + "url": "item?id=50549188" + }, + { + "id": 50554935, + "title": "Unreal Tournament 2004 in the Browser", + "points": 172, + "user": "TheAceOfHearts", + "time": 1795051769, + "time_ago": "12 hours ago", + "comments_count": 83, + "type": "link", + "url": "https://ut2004.dev/", + "domain": "ut2004.dev" + }, + { + "id": 50544261, + "title": "Codeberg.org Not Reachable", + "points": 313, + "user": "hans_castorp", + "time": 1794996137, + "time_ago": "a day ago", + "comments_count": 309, + "type": "link", + "url": "https://social.anoxinon.de/@codebergstatus/117636437840688845", + "domain": "social.anoxinon.de" + }, + { + "id": 50554076, + "title": "Pushing WireGuard on macOS to 5 Gbit/s", + "points": 55, + "user": "wh33zle", + "time": 1795046221, + "time_ago": "14 hours ago", + "comments_count": 7, + "type": "link", + "url": "https://www.firezone.dev/blog/apple-client-performance", + "domain": "firezone.dev" + }, + { + "id": 50548004, + "title": "KVM: x86: Unconditionally reset MMU context when emulating INIT (CVE-2026-99312)", + "points": 189, + "user": "Kozmik1", + "time": 1795017981, + "time_ago": "a day ago", + "comments_count": 124, + "type": "link", + "url": "https://www.cve.org/CVERecord?id=CVE-2026-99312", + "domain": "cve.org" + }, + { + "id": 50554374, + "title": "Gemini 4 Neon looks like an Opus 5.5 competitor", + "points": 239, + "user": "seizethecheese", + "time": 1795048185, + "time_ago": "13 hours ago", + "comments_count": 73, + "type": "link", + "url": "https://micjm.com/blog/gemini-4-neon-looks-like-a-top-model/", + "domain": "micjm.com" + }, + { + "id": 50549493, + "title": "Advancing chip design with OpenAI models", + "points": 214, + "user": "vighneshiyer", + "time": 1795023947, + "time_ago": "20 hours ago", + "comments_count": 153, + "type": "link", + "url": "https://openai.com/index/advancing-chip-design-with-our-models/", + "domain": "openai.com" + }, + { + "id": 50557885, + "title": "DeepMind Employees Are Unionising", + "points": 91, + "user": "nervai", + "time": 1795080536, + "time_ago": "4 hours ago", + "comments_count": 61, + "type": "link", + "url": "https://www.gdmunion.co.uk", + "domain": "gdmunion.co.uk" + }, + { + "id": 50546922, + "title": "A Primer on Fourier Series (2025)", + "points": 130, + "user": "teleforce", + "time": 1795013073, + "time_ago": "a day ago", + "comments_count": 35, + "type": "link", + "url": "https://arxiv.org/abs/2510.18203", + "domain": "arxiv.org" + }, + { + "id": 50559639, + "title": "Cracking a 1024-bit DKIM key now costs about $30M", + "points": 3, + "user": "fayorg", + "time": 1795093909, + "time_ago": "41 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://www.reddit.com/r/DMARC/comments/1xzu4kr/cracking_a_1024bit_dkim_key_now_costs_about_30m/", + "domain": "reddit.com" + }, + { + "id": 50558494, + "title": "AI Overworks People", + "points": 16, + "user": "cmpit", + "time": 1795085549, + "time_ago": "3 hours ago", + "comments_count": 8, + "type": "link", + "url": "https://twitter.com/catalinmpit/status/2123061832781090948", + "domain": "twitter.com" + }, + { + "id": 50524227, + "title": "A Collage Showing 49 Drill Holes Made by NASA's Curiosity Mars Rover", + "points": 57, + "user": "wawayanda", + "time": 1794867571, + "time_ago": "3 days ago", + "comments_count": 6, + "type": "link", + "url": "https://science.nasa.gov/photojournal/a-collage-showing-49-drill-holes-made-by-nasas-curiosity-mars-rover/", + "domain": "science.nasa.gov" + }, + { + "id": 50548991, + "title": "CrossPoint Reader", + "points": 129, + "user": "kristianpaul", + "time": 1795022071, + "time_ago": "21 hours ago", + "comments_count": 62, + "type": "link", + "url": "https://crosspointreader.com", + "domain": "crosspointreader.com" + } +] diff --git a/parity/fixtures/show-1.json b/parity/fixtures/show-1.json new file mode 100644 index 000000000..b47edf7b2 --- /dev/null +++ b/parity/fixtures/show-1.json @@ -0,0 +1,360 @@ +[ + { + "id": 50559749, + "title": "Show HN: Foolscap \u2013 a writing app that reads your book and never writes for you", + "points": 8, + "user": "atugard", + "time": 1795094480, + "time_ago": "36 minutes ago", + "comments_count": 2, + "type": "link", + "url": "https://foolscap.works/", + "domain": "foolscap.works" + }, + { + "id": 50559718, + "title": "Show HN: Psudo \u2013 47MB 2-bit coding model, Polish-prefix IR, and Rust transpiler", + "points": 2, + "user": "someProgramer", + "time": 1795094276, + "time_ago": "40 minutes ago", + "comments_count": 0, + "type": "link", + "url": "https://github.com/steveSujo/psudo", + "domain": "github.com" + }, + { + "id": 50548660, + "title": "Show HN: Mastra Factory, the open-source software factory we use to build Mastra", + "points": 112, + "user": "codekarate", + "time": 1795020822, + "time_ago": "21 hours ago", + "comments_count": 37, + "type": "link", + "url": "item?id=50548660" + }, + { + "id": 50559399, + "title": "Show HN: iOS 27 on the Web", + "points": 2, + "user": "nshelia", + "time": 1795092418, + "time_ago": "an hour ago", + "comments_count": 2, + "type": "link", + "url": "https://liquid.shelia.me/", + "domain": "liquid.shelia.me" + }, + { + "id": 50547980, + "title": "Show HN: ExitPath \u2013 Open-source ways out of Slack, Notion and Microsoft 365", + "points": 236, + "user": "zerocool0101", + "time": 1795017883, + "time_ago": "a day ago", + "comments_count": 81, + "type": "link", + "url": "https://exitpath-ruddy.vercel.app/", + "domain": "exitpath-ruddy.vercel.app" + }, + { + "id": 50548161, + "title": "Show HN: Take Voyager 1 apart, down to a single memory chip", + "points": 220, + "user": "raj-shekhar", + "time": 1795018731, + "time_ago": "a day ago", + "comments_count": 54, + "type": "link", + "url": "https://rshekhar.com/voyager/", + "domain": "rshekhar.com" + }, + { + "id": 50523377, + "title": "Show HN: Open-source, real-time object tracking for live video feeds", + "points": 110, + "user": "aryaman_darda", + "time": 1794863679, + "time_ago": "3 days ago", + "comments_count": 11, + "type": "link", + "url": "https://github.com/aryamandarda/tamserve", + "domain": "github.com" + }, + { + "id": 50532515, + "title": "Show HN: An API for word timestamps from speech, 75% within 20ms", + "points": 29, + "user": "jasperstory", + "time": 1794928605, + "time_ago": "2 days ago", + "comments_count": 5, + "type": "link", + "url": "https://quebec.yarn.so", + "domain": "quebec.yarn.so" + }, + { + "id": 50556534, + "title": "Show HN: Zpup \u2013 Zdog style 3D scenes in JSON, SVG from any angle", + "points": 11, + "user": "select1dev", + "time": 1795067801, + "time_ago": "8 hours ago", + "comments_count": 0, + "type": "link", + "url": "https://github.com/rxolve/zpup", + "domain": "github.com" + }, + { + "id": 50544821, + "title": "Show HN: Type Fighter 2", + "points": 136, + "user": "torumitch", + "time": 1795000313, + "time_ago": "a day ago", + "comments_count": 61, + "type": "link", + "url": "https://typefighter2.com/", + "domain": "typefighter2.com" + }, + { + "id": 50554973, + "title": "Show HN: ADE Index \u2013 a sourced and ranked index of 975 agentic coding tools", + "points": 21, + "user": "jonnyasmar", + "time": 1795052032, + "time_ago": "12 hours ago", + "comments_count": 3, + "type": "link", + "url": "https://adeindex.com", + "domain": "adeindex.com" + }, + { + "id": 50552140, + "title": "Show HN: Robotics needs better CAD, so I wrote a B-rep kernel and 3,487 tests", + "points": 31, + "user": "atomarch", + "time": 1795036127, + "time_ago": "17 hours ago", + "comments_count": 7, + "type": "link", + "url": "https://springcraft-ai.github.io/springrep/", + "domain": "springcraft-ai.github.io" + }, + { + "id": 50532385, + "title": "Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off", + "points": 210, + "user": "prafandy", + "time": 1794928029, + "time_ago": "2 days ago", + "comments_count": 37, + "type": "link", + "url": "https://alloyhtml.com/example.html", + "domain": "alloyhtml.com" + }, + { + "id": 50551614, + "title": "Show HN: PocketOps for SigNoz: The Open Source Datadog Alternative", + "points": 9, + "user": "avens19", + "time": 1795033310, + "time_ago": "18 hours ago", + "comments_count": 0, + "type": "link", + "url": "https://github.com/avens19/pocketops", + "domain": "github.com" + }, + { + "id": 50517410, + "title": "Show HN: Unref \u2013 A Python dead code finder built on Ruff's parser", + "points": 60, + "user": "McAvey", + "time": 1794835830, + "time_ago": "3 days ago", + "comments_count": 18, + "type": "link", + "url": "https://github.com/Apakottur/unref", + "domain": "github.com" + }, + { + "id": 50533270, + "title": "Show HN: TrnRT \u2013 An open-source LLM inference engine for AWS Trainium", + "points": 54, + "user": "sanchitmonga22", + "time": 1794931264, + "time_ago": "2 days ago", + "comments_count": 7, + "type": "link", + "url": "https://github.com/RunanywhereAI/trnrt", + "domain": "github.com" + }, + { + "id": 50543432, + "title": "Show HN: Math 2.0", + "points": 23, + "user": "tamnd", + "time": 1794990393, + "time_ago": "a day ago", + "comments_count": 5, + "type": "link", + "url": "https://math2.tamnd.com/areas/", + "domain": "math2.tamnd.com" + }, + { + "id": 50549718, + "title": "Show HN: BPM \u2013 Baby Plus Music Visualizer", + "points": 11, + "user": "hberg", + "time": 1795024855, + "time_ago": "20 hours ago", + "comments_count": 6, + "type": "link", + "url": "https://hberg.com/bpm/", + "domain": "hberg.com" + }, + { + "id": 50551356, + "title": "Show HN: Beat \u2013 a to-do list that completes its own tasks", + "points": 15, + "user": "brdo", + "time": 1795032105, + "time_ago": "18 hours ago", + "comments_count": 9, + "type": "link", + "url": "https://gobeat.ai/auth/login", + "domain": "gobeat.ai" + }, + { + "id": 50556300, + "title": "Show HN: Snowchive \u2013 Snowden archive of all published documents", + "points": 6, + "user": "libroot", + "time": 1795065086, + "time_ago": "9 hours ago", + "comments_count": 1, + "type": "link", + "url": "https://snowchive.org", + "domain": "snowchive.org" + }, + { + "id": 50550737, + "title": "Show HN: Poptato \u2013 App launcher, command runner, and fuzzy menu for Linux", + "points": 8, + "user": "modinfo", + "time": 1795029505, + "time_ago": "19 hours ago", + "comments_count": 1, + "type": "link", + "url": "https://github.com/skorotkiewicz/poptato", + "domain": "github.com" + }, + { + "id": 50554399, + "title": "Show HN: I built a harness that turns floor plans into 360\u00b0 tours using AI", + "points": 6, + "user": "sidcraftscode", + "time": 1795048352, + "time_ago": "13 hours ago", + "comments_count": 3, + "type": "link", + "url": "https://walkthisplan.com/", + "domain": "walkthisplan.com" + }, + { + "id": 50517840, + "title": "Show HN: Nobody blocks a keyboard \u2013 Rooted Android as a physical USB Deck", + "points": 55, + "user": "mr-anjaneyam", + "time": 1794838695, + "time_ago": "3 days ago", + "comments_count": 53, + "type": "link", + "url": "https://github.com/mr-anjaneyam/Emittr", + "domain": "github.com" + }, + { + "id": 50496787, + "title": "Show HN: Zigzag, a native Mac browser for people leaving Arc", + "points": 120, + "user": "ZigaoWang", + "time": 1794662230, + "time_ago": "5 days ago", + "comments_count": 74, + "type": "link", + "url": "https://github.com/ZigaoWang/zigzag", + "domain": "github.com" + }, + { + "id": 50550420, + "title": "Show HN: Sci-Fi Futures \u2013 Reverse-engineering tech from classic sci-fi novels", + "points": 5, + "user": "ninajlu", + "time": 1795027801, + "time_ago": "19 hours ago", + "comments_count": 3, + "type": "link", + "url": "https://scififutures.vercel.app", + "domain": "scififutures.vercel.app" + }, + { + "id": 50555010, + "title": "Show HN: Solid 2.0 + Lily Design System = seeking alpha testers", + "points": 2, + "user": "jph", + "time": 1795052340, + "time_ago": "12 hours ago", + "comments_count": 0, + "type": "link", + "url": "item?id=50555010" + }, + { + "id": 50554637, + "title": "Show HN: A quiet screen that keeps time with you", + "points": 2, + "user": "cflsdf", + "time": 1795049826, + "time_ago": "13 hours ago", + "comments_count": 0, + "type": "link", + "url": "https://nonloop.github.io/funclock/", + "domain": "nonloop.github.io" + }, + { + "id": 50554630, + "title": "Show HN: Dancing Particle is an interactive app built for stress relief", + "points": 2, + "user": "cflsdf", + "time": 1795049767, + "time_ago": "13 hours ago", + "comments_count": 0, + "type": "link", + "url": "https://apps.apple.com/cn/app/%E9%A3%9E%E8%88%9E%E7%B2%92%E5%AD%90-%E4%BA%94%E5%BD%A9%E6%96%91%E6%96%93%E7%9A%84%E6%8C%87%E5%B0%96%E8%89%BA%E6%9C%AF/id6444665083", + "domain": "apps.apple.com" + }, + { + "id": 50550607, + "title": "Show HN: Fun with bicycle trainers and web APIs", + "points": 7, + "user": "okayestjoel", + "time": 1795028749, + "time_ago": "19 hours ago", + "comments_count": 3, + "type": "link", + "url": "https://joelriley.com/fun-with-trainers", + "domain": "joelriley.com" + }, + { + "id": 50554425, + "title": "Show HN: Generate Angular TestBed specs and Storybook stories locally, no LLM", + "points": 3, + "user": "sshyeri", + "time": 1795048527, + "time_ago": "13 hours ago", + "comments_count": 0, + "type": "link", + "url": "https://sshyeri.github.io/ng-test-foundry-public/", + "domain": "sshyeri.github.io" + } +] diff --git a/parity/fixtures/user-harrisonpage.json b/parity/fixtures/user-harrisonpage.json new file mode 100644 index 000000000..65c21c0cc --- /dev/null +++ b/parity/fixtures/user-harrisonpage.json @@ -0,0 +1,7 @@ +{ + "about": "whatever, man", + "created_time": 1443724187, + "created": "11 years ago", + "id": "harrisonpage", + "karma": 117 +} diff --git a/parity/package-lock.json b/parity/package-lock.json new file mode 100644 index 000000000..5ea20c873 --- /dev/null +++ b/parity/package-lock.json @@ -0,0 +1,76 @@ +{ + "name": "angular-hnpwa-parity", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "angular-hnpwa-parity", + "devDependencies": { + "@playwright/test": "1.65.1", + "@types/node": "^24.19.2" + } + }, + "node_modules/@playwright/test": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz", + "integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@types/node": { + "version": "24.19.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", + "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, + "node_modules/playwright": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz", + "integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/parity/package.json b/parity/package.json new file mode 100644 index 000000000..0e9c3442a --- /dev/null +++ b/parity/package.json @@ -0,0 +1,17 @@ +{ + "name": "angular-hnpwa-parity", + "private": true, + "description": "Playwright parity suite: the same specs against legacy (Angular 9) and angular21", + "scripts": { + "test": "playwright test", + "test:legacy": "playwright test --project=legacy", + "test:angular21": "playwright test --project=angular21", + "serve:legacy": "bash scripts/serve-legacy.sh", + "serve:angular21": "bash scripts/serve-angular21.sh", + "report": "playwright show-report report/html" + }, + "devDependencies": { + "@playwright/test": "1.65.1", + "@types/node": "^24.19.2" + } +} diff --git a/parity/playwright.config.ts b/parity/playwright.config.ts new file mode 100644 index 000000000..2f0d0eb7a --- /dev/null +++ b/parity/playwright.config.ts @@ -0,0 +1,45 @@ +import { defineConfig, devices } from '@playwright/test'; + +// Same specs, two apps: `legacy` = Angular 9 (master) on :4000, `angular21` = this branch on :4200. +// Both are production builds (service worker included); see scripts/serve-*.sh and README.md. +const apps = [ + { name: 'legacy', port: Number(process.env.LEGACY_PORT ?? 4000), script: 'scripts/serve-legacy.sh' }, + { name: 'angular21', port: Number(process.env.ANGULAR21_PORT ?? 4200), script: 'scripts/serve-angular21.sh' }, +]; + +// Start only the servers for the projects that were asked for (all of them by default). +const requested = process.argv + .flatMap((arg, i, argv) => + arg === '--project' ? [argv[i + 1]] : arg.startsWith('--project=') ? [arg.slice(10)] : [] + ) + .filter(Boolean); +const selected = requested.length ? apps.filter((app) => requested.includes(app.name)) : apps; + +export default defineConfig({ + testDir: './specs', + outputDir: './test-results', + timeout: 60_000, + expect: { timeout: 15_000 }, + fullyParallel: true, + forbidOnly: !!process.env.CI, + retries: process.env.CI ? 2 : 1, + reporter: [['list'], ['html', { outputFolder: 'report/html', open: 'never' }]], + use: { + ...devices['Desktop Chrome'], + viewport: { width: 1280, height: 900 }, + colorScheme: 'light', + serviceWorkers: 'block', + trace: 'retain-on-failure', + screenshot: 'only-on-failure', + }, + projects: apps.map((app) => ({ name: app.name, use: { baseURL: `http://localhost:${app.port}` } })), + webServer: process.env.PARITY_NO_SERVER + ? undefined + : selected.map((app) => ({ + command: `bash ${app.script}`, + url: `http://localhost:${app.port}`, + reuseExistingServer: true, + timeout: 15 * 60_000, + stdout: 'pipe' as const, + })), +}); diff --git a/parity/scripts/serve-angular21.sh b/parity/scripts/serve-angular21.sh new file mode 100755 index 000000000..1b934a329 --- /dev/null +++ b/parity/scripts/serve-angular21.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Production build of the Angular 21 app (this checkout) served on port 4200. +set -euo pipefail +PARITY_DIR="$(cd "$(dirname "$0")/.." && pwd)" +REPO_DIR="$(cd "$PARITY_DIR/.." && pwd)" +PORT="${ANGULAR21_PORT:-4200}" + +export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" +if [ -s "$NVM_DIR/nvm.sh" ]; then + . "$NVM_DIR/nvm.sh" + nvm install 24 >/dev/null + nvm use 24 >/dev/null +fi + +cd "$REPO_DIR" +[ -d node_modules ] || npm ci --no-audit --no-fund +npx ng build +exec node "$PARITY_DIR/scripts/static-server.js" dist/angular-hnpwa/browser "$PORT" diff --git a/parity/scripts/serve-legacy.sh b/parity/scripts/serve-legacy.sh new file mode 100755 index 000000000..53bb5e751 --- /dev/null +++ b/parity/scripts/serve-legacy.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Production build of the Angular 9 app (branch master) served on port 4000. +# Uses a git worktree of origin/master unless LEGACY_DIR points at an existing checkout. +set -euo pipefail +PARITY_DIR="$(cd "$(dirname "$0")/.." && pwd)" +REPO_DIR="$(cd "$PARITY_DIR/.." && pwd)" +LEGACY_DIR="${LEGACY_DIR:-$REPO_DIR/.parity-legacy}" +PORT="${LEGACY_PORT:-4000}" + +if [ ! -d "$LEGACY_DIR" ]; then + git -C "$REPO_DIR" fetch origin master + git -C "$REPO_DIR" worktree add --detach "$LEGACY_DIR" origin/master +fi + +export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" +if [ -s "$NVM_DIR/nvm.sh" ]; then + . "$NVM_DIR/nvm.sh" + nvm install 14 >/dev/null + nvm use 14 >/dev/null +fi + +cd "$LEGACY_DIR" +[ -d node_modules ] || npm install --no-audit --no-fund +[ -f dist/angular-hnpwa/ngsw-worker.js ] && [ -z "${REBUILD:-}" ] || npx ng build --prod +exec node "$PARITY_DIR/scripts/static-server.js" dist/angular-hnpwa "$PORT" diff --git a/parity/scripts/static-server.js b/parity/scripts/static-server.js new file mode 100644 index 000000000..f4d542a60 --- /dev/null +++ b/parity/scripts/static-server.js @@ -0,0 +1,36 @@ +// Serves a production build with SPA fallback (unknown paths -> index.html). +// No dependencies, CommonJS, so it runs on Node 14 (legacy) and Node 24 (angular21). +const http = require('http'); +const fs = require('fs'); +const path = require('path'); + +const [root, port] = [path.resolve(process.argv[2]), Number(process.argv[3])]; +const types = { + '.html': 'text/html; charset=utf-8', + '.js': 'text/javascript; charset=utf-8', + '.css': 'text/css; charset=utf-8', + '.json': 'application/json; charset=utf-8', + '.webmanifest': 'application/manifest+json', + '.svg': 'image/svg+xml', + '.png': 'image/png', + '.ico': 'image/x-icon', + '.xml': 'application/xml', + '.txt': 'text/plain; charset=utf-8', +}; + +http.createServer((req, res) => { + const urlPath = decodeURIComponent(new URL(req.url, 'http://localhost').pathname); + let file = path.join(root, path.normalize(urlPath)); + if (!file.startsWith(root) || !fs.existsSync(file) || fs.statSync(file).isDirectory()) { + file = path.extname(urlPath) ? null : path.join(root, 'index.html'); + } + if (!file) { + res.writeHead(404).end('Not found'); + return; + } + res.writeHead(200, { + 'Content-Type': types[path.extname(file)] || 'application/octet-stream', + 'Cache-Control': 'no-cache', + }); + fs.createReadStream(file).pipe(res); +}).listen(port, () => console.log(`Serving ${root} on http://localhost:${port}`)); diff --git a/parity/specs/feeds.spec.ts b/parity/specs/feeds.spec.ts new file mode 100644 index 000000000..1c9e5f568 --- /dev/null +++ b/parity/specs/feeds.spec.ts @@ -0,0 +1,91 @@ +import { expect, fixture, live, test } from '../fixtures'; + +type Story = { id: number; title: string; points: number; user: string; comments_count: number; type: string }; + +const commentLabel = (n: number) => (n > 0 ? `${n} ${n === 1 ? 'comment' : 'comments'}` : 'discuss'); +const stories = (page: import('@playwright/test').Page) => page.getByRole('list').first().getByRole('listitem'); + +test.describe('feeds', () => { + test('root redirects to the first page of top stories', async ({ page }) => { + await page.goto('/'); + await expect(page).toHaveURL(/\/news\/1$/); + await expect(stories(page)).toHaveCount(30); + }); + + test('news page 1 lists 30 stories with points, author and comment count', async ({ page }) => { + await page.goto('/news/1'); + await expect(stories(page)).toHaveCount(30); + await expect(page.getByRole('list').first()).toHaveAttribute('start', '1'); + if (live) return; + + const news = fixture('news-1'); + for (const [i, story] of news.entries()) { + const item = stories(page).nth(i); + await expect(item.getByRole('link', { name: story.title, exact: true })).toBeVisible(); + await expect(item).toContainText(`${story.points} points by ${story.user}`); + await expect( + item.getByRole('link', { name: commentLabel(story.comments_count), exact: true }) + ).toBeVisible(); + } + }); + + test('pagination: More goes to page 2 and Prev comes back', async ({ page }) => { + await page.goto('/news/1'); + await expect(stories(page)).toHaveCount(30); + await expect(page.getByRole('link', { name: '‹ Prev' })).toHaveCount(0); + + await page.getByRole('link', { name: 'More ›' }).click(); + await expect(page).toHaveURL(/\/news\/2$/); + await expect(page.getByRole('list').first()).toHaveAttribute('start', '31'); + if (!live) { + const [first] = fixture('news-2'); + await expect(stories(page).first().getByRole('link', { name: first.title, exact: true })).toBeVisible(); + } + + await page.getByRole('link', { name: '‹ Prev' }).click(); + await expect(page).toHaveURL(/\/news\/1$/); + await expect(page.getByRole('list').first()).toHaveAttribute('start', '1'); + }); + + for (const [label, feed] of [ + ['new', 'newest'], + ['show', 'show'], + ['ask', 'ask'], + ['jobs', 'jobs'], + ] as const) { + test(`header "${label}" link opens the ${feed} feed`, async ({ page }) => { + await page.goto('/news/1'); + await expect(stories(page)).toHaveCount(30); + await page.getByRole('link', { name: label, exact: true }).click(); + await expect(page).toHaveURL(new RegExp(`/${feed}/1$`)); + if (live) { + await expect(stories(page).first()).toBeVisible(); + return; + } + const items = fixture(`${feed}-1`); + await expect(stories(page)).toHaveCount(items.length); + await expect(stories(page).first().getByRole('link', { name: items[0].title, exact: true })).toBeVisible(); + await expect(page.getByRole('link', { name: 'More ›' })).toHaveCount(items.length === 30 ? 1 : 0); + }); + } + + test('jobs feed shows the YC jobs header and no points or comments', async ({ page }) => { + await page.goto('/jobs/1'); + await expect(page.getByText('These are jobs at startups that were funded by Y Combinator.')).toBeVisible(); + await expect(page.getByRole('link', { name: 'Triplebyte' })).toBeVisible(); + await expect(stories(page).first()).not.toContainText('points by'); + await expect( + stories(page) + .first() + .getByRole('link', { name: /comments|discuss/ }) + ).toHaveCount(0); + }); + + test('logo link returns to top stories', async ({ page }) => { + await page.goto('/show/1'); + await expect(stories(page).first()).toBeVisible(); + await page.getByRole('link', { name: 'Logo' }).click(); + await expect(page).toHaveURL(/\/news\/1$/); + await expect(stories(page)).toHaveCount(30); + }); +}); diff --git a/parity/specs/pwa.spec.ts b/parity/specs/pwa.spec.ts new file mode 100644 index 000000000..e6313e504 --- /dev/null +++ b/parity/specs/pwa.spec.ts @@ -0,0 +1,45 @@ +import { expect, test } from '../fixtures'; + +// The production build must ship a working Angular service worker. +test.describe('PWA', () => { + test.use({ serviceWorkers: 'allow' }); + + test('serves the web app manifest', async ({ page, request }) => { + await page.goto('/news/1'); + const href = await page.locator('link[rel="manifest"]').first().getAttribute('href'); + const response = await request.get(new URL(href!, page.url()).toString()); + expect(response.ok()).toBe(true); + const manifest = await response.json(); + expect(manifest).toMatchObject({ name: 'Angular 2 HN', display: 'standalone', theme_color: '#b92b27' }); + expect(manifest.icons.length).toBeGreaterThan(0); + }); + + test('ships ngsw.json built from ngsw-config.json', async ({ request }) => { + const response = await request.get('/ngsw.json'); + expect(response.ok()).toBe(true); + const ngsw = await response.json(); + expect(ngsw.index).toBe('/index.html'); + expect(ngsw.assetGroups.map((g: { name: string }) => g.name)).toEqual(['app', 'assets']); + const app = ngsw.assetGroups[0]; + expect(app.installMode).toBe('prefetch'); + expect(app.urls).toContain('/index.html'); + expect(app.urls.some((url: string) => url.endsWith('.js'))).toBe(true); + }); + + test('registers ngsw-worker.js and loads the app shell offline', async ({ page, context }) => { + await page.goto('/news/1'); + const scriptURL = await page.evaluate(async () => (await navigator.serviceWorker.ready).active!.scriptURL); + expect(new URL(scriptURL).pathname).toBe('/ngsw-worker.js'); + + // Controlled once the worker has claimed the page; reload to be sure. + await page.reload(); + await expect.poll(() => page.evaluate(() => !!navigator.serviceWorker.controller)).toBe(true); + + await context.setOffline(true); + await page.goto('/news/1'); + expect(await page.evaluate(() => navigator.onLine)).toBe(false); + await expect(page).toHaveTitle('Angular 2 HN'); + await expect(page.locator('app-root > *').first()).toBeAttached(); + await context.setOffline(false); + }); +}); diff --git a/parity/specs/settings.spec.ts b/parity/specs/settings.spec.ts new file mode 100644 index 000000000..bee57648b --- /dev/null +++ b/parity/specs/settings.spec.ts @@ -0,0 +1,86 @@ +import type { Page } from '@playwright/test'; +import { expect, test } from '../fixtures'; + +const THEME_BACKGROUND = { + Default: 'rgb(255, 255, 255)', + Night: 'rgb(55, 71, 79)', + 'Black (AMOLED)': 'rgb(0, 0, 0)', +} as const; + +// Colour of the page backdrop next to the centred content column. +const backdropColor = (page: Page) => + page.evaluate(() => getComputedStyle(document.elementFromPoint(5, innerHeight - 5)!).backgroundColor); + +async function selectTheme(page: Page, theme: keyof typeof THEME_BACKGROUND) { + await openSettings(page); + await page.getByRole('radio', { name: theme }).check(); + await page.getByText('×', { exact: true }).click(); + await expect(page.getByRole('heading', { name: 'Settings' })).toBeHidden(); + await expect.poll(() => backdropColor(page)).toBe(THEME_BACKGROUND[theme]); +} + +async function openSettings(page: Page) { + await page.getByRole('img', { name: 'Settings' }).click(); + await expect(page.getByRole('heading', { name: 'Settings' })).toBeVisible(); +} + +test.describe('settings', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/news/1'); + await expect(page.getByRole('list').first().getByRole('listitem').first()).toBeVisible(); + }); + + test('opens and closes the settings popup', async ({ page }) => { + await openSettings(page); + await expect(page.getByRole('radio', { name: 'Default' })).toBeChecked(); + await expect(page.getByRole('checkbox')).not.toBeChecked(); + await page.getByText('×', { exact: true }).click(); + await expect(page.getByRole('heading', { name: 'Settings' })).toBeHidden(); + }); + + test('theme toggle recolours the app and survives a reload', async ({ page }) => { + expect(await backdropColor(page)).toBe(THEME_BACKGROUND.Default); + + await selectTheme(page, 'Night'); + await selectTheme(page, 'Black (AMOLED)'); + await selectTheme(page, 'Night'); + + await page.reload(); + await expect.poll(() => backdropColor(page)).toBe(THEME_BACKGROUND.Night); + await openSettings(page); + await expect(page.getByRole('radio', { name: 'Night' })).toBeChecked(); + await page.getByText('×', { exact: true }).click(); + + await selectTheme(page, 'Default'); + }); + + test('"Open links in a new tab" makes story links open in a new tab', async ({ page }) => { + const title = page.getByRole('list').first().getByRole('listitem').first().getByRole('link').first(); + await expect(title).not.toHaveAttribute('target', '_blank'); + await openSettings(page); + await page.getByRole('checkbox').check(); + await page.getByText('×', { exact: true }).click(); + await expect(title).toHaveAttribute('target', '_blank'); + await page.reload(); + await expect(title).toHaveAttribute('target', '_blank'); + }); + + test('font size and list spacing change the story list', async ({ page }) => { + const first = page.getByRole('list').first().getByRole('listitem').first(); + await expect(first.getByRole('link').first()).toHaveCSS('font-size', '16px'); + await openSettings(page); + + const fontSize = page.getByRole('spinbutton', { name: 'Font size:' }); + await fontSize.selectText(); + await fontSize.pressSequentially('22'); + await expect(first.getByRole('link').first()).toHaveCSS('font-size', '22px'); + + const firstTop = await page.getByRole('list').first().getByRole('listitem').nth(1).boundingBox(); + const spacing = page.getByRole('spinbutton', { name: 'List spacing:' }); + await spacing.selectText(); + await spacing.pressSequentially('40'); + await expect + .poll(async () => (await page.getByRole('list').first().getByRole('listitem').nth(1).boundingBox())!.y) + .toBeGreaterThan(firstTop!.y + 30); + }); +}); diff --git a/parity/specs/story.spec.ts b/parity/specs/story.spec.ts new file mode 100644 index 000000000..27fd6f15c --- /dev/null +++ b/parity/specs/story.spec.ts @@ -0,0 +1,84 @@ +import type { Page } from '@playwright/test'; +import { expect, fixture, live, test } from '../fixtures'; + +type Comment = { id: number; user: string; content: string; deleted?: boolean; comments: Comment[] }; +type Item = { + id: number; + title: string; + points: number; + user: string; + domain: string; + comments_count: number; + comments: Comment[]; +}; + +const ITEM_ID = 50519231; +const item = fixture(`item-${ITEM_ID}`); +const countComments = (comments: Comment[]): number => + comments.reduce((n, c) => n + (c.deleted ? 0 : 1) + countComments(c.comments ?? []), 0); + +// First words of a comment as the browser renders its HTML. +const firstWords = (page: Page, html: string) => + page.evaluate((h) => { + const el = document.createElement('div'); + el.innerHTML = h; + return (el.firstChild?.textContent ?? el.textContent ?? '').trim().replace(/\s+/g, ' ').slice(0, 30); + }, html); + +test.describe('story page', () => { + test.skip(live, 'story assertions use the recorded fixtures'); + + test('opens from the comments link on the feed', async ({ page }) => { + await page.goto('/news/1'); + const story = fixture('news-1').find((s) => s.id === ITEM_ID)!; + await page.getByRole('link', { name: `${story.comments_count} comments`, exact: true }).click(); + await expect(page).toHaveURL(new RegExp(`/item/${ITEM_ID}$`)); + await expect(page.getByRole('link', { name: item.title, exact: true })).toBeVisible(); + }); + + test('shows title, domain, points, author and comment count', async ({ page }) => { + await page.goto(`/item/${ITEM_ID}`); + await expect(page.getByRole('link', { name: item.title, exact: true })).toBeVisible(); + await expect(page.getByText(`(${item.domain})`)).toBeVisible(); + await expect(page.getByText(`${item.points} points by ${item.user}`)).toBeVisible(); + await expect(page.getByRole('link', { name: `${item.comments_count} comments`, exact: true })).toBeVisible(); + }); + + test('renders the whole comment tree', async ({ page }) => { + await page.goto(`/item/${ITEM_ID}`); + await expect(page.getByText('[-]', { exact: true })).toHaveCount(countComments(item.comments)); + for (const comment of item.comments.filter((c) => !c.deleted)) { + await expect(page.getByRole('link', { name: comment.user, exact: true }).first()).toBeVisible(); + await expect(page.getByText(await firstWords(page, comment.content)).first()).toBeVisible(); + } + }); + + test('collapsing a comment hides its replies, expanding shows them again', async ({ page }) => { + const parent = item.comments.find((c) => !c.deleted && c.comments?.length)!; + const index = item.comments.filter((c) => !c.deleted).indexOf(parent); + await page.goto(`/item/${ITEM_ID}`); + const reply = page.getByText(await firstWords(page, parent.comments[0].content)).first(); + await expect(reply).toBeVisible(); + + // Top-level comments are the [-] toggles that are not nested in another comment. + const toggles = page.getByText('[-]', { exact: true }); + const offset = item.comments + .filter((c) => !c.deleted) + .slice(0, index) + .reduce((n, c) => n + 1 + countComments(c.comments ?? []), 0); + await toggles.nth(offset).click(); + await expect(page.getByText('[+]', { exact: true })).toHaveCount(1); + await expect(reply).toBeHidden(); + + await page.getByText('[+]', { exact: true }).click(); + await expect(page.getByText('[+]', { exact: true })).toHaveCount(0); + await expect(reply).toBeVisible(); + }); + + test('author link opens the user profile', async ({ page }) => { + await page.goto(`/item/${ITEM_ID}`); + await page.getByText(`${item.points} points by`).getByRole('link', { name: item.user, exact: true }).click(); + await expect(page).toHaveURL(new RegExp(`/user/${item.user}$`)); + await expect(page.getByText(`Created ${fixture(`user-${item.user}`).created}`)).toBeVisible(); + }); +}); diff --git a/parity/specs/user.spec.ts b/parity/specs/user.spec.ts new file mode 100644 index 000000000..b3321ba33 --- /dev/null +++ b/parity/specs/user.spec.ts @@ -0,0 +1,19 @@ +import { expect, fixture, live, test } from '../fixtures'; + +type User = { id: string; karma: number; created: string; about: string }; + +test.describe('user profile', () => { + test('shows id, karma, account age and about', async ({ page }) => { + const id = live ? 'pg' : 'harrisonpage'; + await page.goto(`/user/${id}`); + await expect(page.getByText(id, { exact: true }).first()).toBeVisible(); + await expect(page.getByText(/^Created .+ ago$/)).toBeVisible(); + await expect(page.getByText(/^\d+ ★$/)).toBeVisible(); + if (live) return; + + const user = fixture(`user-${id}`); + await expect(page.getByText(`${user.karma} ★`, { exact: true })).toBeVisible(); + await expect(page.getByText(`Created ${user.created}`, { exact: true })).toBeVisible(); + await expect(page.getByText(user.about, { exact: true })).toBeVisible(); + }); +}); diff --git a/parity/tsconfig.json b/parity/tsconfig.json new file mode 100644 index 000000000..c30ab68f5 --- /dev/null +++ b/parity/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "esModuleInterop": true, + "noEmit": true, + "types": ["node"] + }, + "include": ["**/*.ts"], + "exclude": ["node_modules"] +} From d0be4be287c63c016ff9d0be1ff4187a247bc237 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:07:05 +0000 Subject: [PATCH 3/3] ci: build and unit tests on pull requests Co-Authored-By: danial.asaria --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..a8bafd2e3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + pull_request: + push: + branches: [master, devin/angular21-base] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-test: + name: Build and unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + - run: npm ci + - name: Production build (with service worker) + run: npm run build + - name: Check the service worker was emitted + run: test -f dist/angular-hnpwa/browser/ngsw-worker.js && test -f dist/angular-hnpwa/browser/ngsw.json + - name: Unit tests + run: npm test -- --watch=false