Skip to content

Rewrite/v2 - #529

Open
lindesvard wants to merge 365 commits into
mainfrom
rewrite/v2
Open

lindesvard wants to merge 365 commits into
mainfrom
rewrite/v2

Conversation

@lindesvard

Copy link
Copy Markdown
Contributor

No description provided.

ralph added 30 commits September 9, 2026 03:20
…Services members become ReturnType<typeof createXService>, and the 191 factory members that lose their contextual type get explicit return types
…the assistant tool runtime - the 'no context' paths get deps from the route that already holds them
…he deps the caller already holds - v1-compat's wrapper class (b), convertible one module at a time
…ts, 71 importers - with the five class-(c) exports rehomed rather than dropped
…onfig loader, and the loader gains the shape ADR-022 R17 specifies
…onfig in, no logger, ProviderError with retryable - and the seven single-consumer clients move into the module that uses them
…d files go where they belong and the layer rules flip from warn to error at 0
…ities below every package, Node-only code under /server - and the five duplicated copies deleted
…R2, R4, R13 and the findings no rule covers
… - R12, R13 and the findings no rule covers
…1, R2, R4, R8 and the findings no rule covers
…R1, R4, R13, R16 and the findings no rule covers
… R1, R11, R13, R16 and the findings no rule covers
…1, R8, R13 and the findings no rule covers
… - R12, R16 and the findings no rule covers
…ion - R2, R13 and the findings no rule covers
…ion - R11, R16 and the findings no rule covers
…- R1, R8, R13 and the findings no rule covers
lindesvard and others added 30 commits October 4, 2026 21:42
Session lookup treated any error as "nobody is signed in", so a short
database outage sent every user to the login page. A database error is
now a server error the dashboard retries; an unknown session cookie
still means signed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Submitting the sign-in, sign-up, reset-password or share-password form
before the page's JavaScript had loaded sent a GET with the email and
password in the query string, where browser history and proxy logs
keep them. The forms now post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The tests checked the removed member's access as soon as the row left
the table, which can happen before the server has processed the
removal; waiting for the response matched the CORS preflight instead of
the request. They now wait for the POST.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Revenue, cohort, profile and group filters were offered on the overview
but either broke the widgets (revenue) or changed nothing (cohort,
profile, group). Opening the filters from a filter pill offered every
category; it now offers the same event filters as the Filters button,
and the overview ignores a revenue filter in the URL instead of
failing. Also removes the /widget/test page, a development leftover
that was publicly reachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Clicking a UTM row in the sources widget added a filter that the
overview silently dropped, so the numbers did not change. A path filter
with no value picked yet switched the overview to a different query and
changed the totals. With a page filter, session duration was measured
to the next view of the same page, so it came out as 0 or nonsense;
it is now measured to the session's next page view of any kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
When the sessions list request failed, the whole app was replaced by a
crash page. When the overview stats request failed, every metric card
showed 0, which reads as traffic dropping to nothing. Both now show an
error with a retry button and keep the rest of the page usable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Picking 29-30 Sep in the events list showed nothing from 30 Sep: the
range ended at the start of the last day. It now ends at the end of
that day.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
On a public share, three things needed a signed-in user and sent
anonymous visitors to /login: the details button on overview widgets,
any user-flow (sankey) chart, and the View Users / Add Reference menu
on a chart point. Overview details now load through the share, user-flow
charts are share-aware like the other chart types, and the point menu
is hidden on shares. A share request for a missing report now answers
404 instead of 401.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Share lookups threw plain errors, so a missing, private or mismatched
share came back as a 500 with a stack trace in development.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Sessions with no geo data returned a country of two NUL characters,
which rendered an empty country block and broke hydration on the
session page; breakdowns by country or date also gained a phantom empty
series. Country is now empty for those sessions, and breakdown fill
rows no longer turn into series of their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
A profile's first session was missing from its session count, duration
and bounce rate, because they were counted from events that still carry
the anonymous device id before the user is identified. They now come
from the sessions table, as the overview does. Session durations were
shown in minutes as if they were seconds (a 53-second session read
"1s"); they are now seconds end to end. The MCP get_profile_metrics
tool now reports its *Min fields in minutes like the assistant does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The value picker in the Filters sheet only looked at pageview events, so
a project that tracks no pageviews (an app or backend project) got an
empty list, while the filter pill next to it showed values. Both now
suggest values seen on any event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The p11 codemod, the p12/p13 gate scripts and the lock-snapshot scripts
were milestone checks for the rewrite. Nothing references them, and the
lock snapshot was generated from pnpm-lock.yaml, which no longer
exists. The conformance gate, the image boot gate (p13-images.sh, still
referenced by docs), release, publish and the shared tsconfig stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Corrects a comment that still described cluster mode as derived from
SELF_HOSTED, which only v1 did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Removes narration, section banners, history ("used to", "replaces"),
citations of documents and trackers the reader cannot open, and spec-style
essay headers. Keeps the reasons behind non-obvious choices: ClickHouse
cluster and mutation notes, Kafka durability and offset handling, security
rationale. Comments only; no code changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Same rules as the previous commit, applied to assistant, mcp, insight,
integration, import, auth, organization, gsc, email, session, event,
profile, notification, subscription, project, share and the smaller
modules. Comments only; no code changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Applies the same rules to the shared helpers, http and rpc layers, the
clients, the package barrel and the test helpers. Comments only; no code
changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Keeps the migration and ClickHouse reasoning, drops history, banners and
citations. Comments only; no code changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Removes tracker pointers, history, essay headers, commented-out JSX and
one-line JSX labels that only name the next element. Also drops a fragment
that wrapped a single element once its label comment was gone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
…ents

Open-defect notes now say what is wrong instead of citing a report id.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Shortens the rewrite-era headers in the dependency rules, Dockerfiles,
workflows, conformance gate and helper scripts, keeping every build and
boot constraint. Comments only; no code changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
With two or more breakdowns, an empty value was dropped from the series
labels, so the next value moved into its place. A screen_view series with
no referrer but country AU was reported as referrer "AU", its drill-down
filtered on the wrong property, and rows such as ('', AU) and (AU, '')
merged into one series. Empty values now keep their position (shown as
"(not set)"); only trailing empties are trimmed, so single-breakdown and
last-breakdown-unset series are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
…anges

For ranges like 7d the upper bound was an invalid Date, so the assistant
could not list chart references for them. The tool now resolves the
window the same way chart references are resolved for reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
ISSUES.md is a local working list of open QA findings; it is now ignored
instead of tracked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The messages printed when a dependency or conformance rule fires cited
internal decision records, task ids and a document that is not in the
repository. They now say what the rule is and why. Two exemptions for
files that no longer exist are dropped. Rule logic is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
…open

On the dev server the first click can land before hydration and is
swallowed; the spec now uses the shared openMenu helper like the other
organization specs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
Removed code nothing calls: the legacy insights scanner (most of its SQL
no longer ran), an all-comment Sentry middleware file, a re-export in
@openpanel/db, an unused profile column list, the zChartInput alias, and
core's JSON re-export (@openpanel/db now imports @openpanel/shared
directly). Removed one-off scripts and logs: ch-copy-from-remote.ts
(it only printed its query and never ran it), seed-events.mjs (replaced
by packages/seed and bun run send), the fresh-install drill, two
rewrite proof scripts in apps/api/e2e, milestone logs, a dev supervisor
script and a stale .cursorrules. Geo loading no longer logs on success.
bun.lock is synced with tooling/release's pinned openai version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The process logger wrote to stdout only, so with HYPERDX_API_KEY set every
request, job, buffer and ingest log was missing from the log pipeline;
only the ClickHouse, Prisma and Kafka client loggers shipped. The main
logger now uses the same HyperDX transport, and stray process output
(dependency warnings, kafkajs lines) is routed through it. Workers log
under the service name "worker" and everything else under "api", the
names v1 used, so existing log searches keep matching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The HTTP port only opened after the Kafka consumer had joined its group,
which can take most of a minute. A liveness probe failed meanwhile and the
orchestrator killed the worker, which triggered another rebalance. The
port now opens first; /healthz/live answers at once and /healthz/ready
returns 503 with reason "booting" until boot has finished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd
The variable was accepted but never reached kafkajs, which always used its
60 second default. It now applies, with the same 60 second default, so
installs that never set it behave as before. While a rebalance waits for a
member that left without leaving the group, no consumer processes events,
so a high value lengthens those stalls; the docs say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R98eNn1HyLim1BSXEAgotd

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant