Comparisons (synastry) of the own chart and persons
CI / test (push) Successful in 45s
CI / build (push) Successful in 4m19s
CI / deploy (push) Skipped

/osszevetesek compares any two of the user's charts (own and persons); the
person card and the person's chart page have "Összevetés velem". The
comparison page shows a double wheel (first person inside with houses, second
outside, aspects between them), the aspects by character, and tabs: paid
relationship analysis (synastry unit), the cross aspect grid, house overlays,
composite and the full aspect list.

Correcting a person within the hour now deletes the user's own comparisons
with them instead of being refused; still refused after a paid analysis or
when someone else's comparison uses the chart.

The relationship analysis prompt is editable on /admin/promptok too, and can be
tried on one of the admin's comparisons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-17 16:04:44 +00:00
co-authored by Claude Opus 5.5
parent b77dafdb26
commit 0bd5c39080
27 changed files with 1541 additions and 146 deletions
+10 -10
View File
@@ -2,7 +2,7 @@ import { ASPECTS, POINTS, SIGNS, dms, orbText, pointName, signName } from "@/lib
import type { ChartResult, Position } from "@/lib/types";
// Radii of the rings (viewBox is SIZE × SIZE, centre C).
const SIZE = 680;
export const SIZE = 680;
const C = SIZE / 2;
const R_LABEL = 322; // ASC / MC labels
const R_OUT = 300; // outer edge of the zodiac ring
@@ -13,7 +13,7 @@ const R_HOUSE = 172; // outer edge of the house-number ring
const R_INNER = 146; // aspect circle
// Points drawn on the wheel; the asteroids and the south node are only in the tables.
const WHEEL_POINTS = [
export const WHEEL_POINTS = [
"sun",
"moon",
"mercury",
@@ -30,10 +30,10 @@ const WHEEL_POINTS = [
];
// Aspects drawn on the wheel, between these points; the rest (minor aspects,
// nodes, Lilith, Chiron) are only in the aspect table.
const WHEEL_ASPECTS = ["opposition", "square", "trine", "sextile"];
const ASPECT_POINTS = ["sun", "moon", "mercury", "venus", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto"];
const SIGN_ORDER = Object.keys(SIGNS);
const SIGN_ELEMENT = ["fire", "earth", "air", "water"];
export const WHEEL_ASPECTS = ["opposition", "square", "trine", "sextile"];
export const ASPECT_POINTS = ["sun", "moon", "mercury", "venus", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto"];
export const SIGN_ORDER = Object.keys(SIGNS);
export const SIGN_ELEMENT = ["fire", "earth", "air", "water"];
const ANGLE_LABELS: [string, string][] = [
["ascendant", "ASC"],
["midheaven", "MC"],
@@ -42,15 +42,15 @@ const ANGLE_LABELS: [string, string][] = [
];
/** Screen point of an ecliptic longitude: the ascendant (or 0° Aries) is on the left. */
function xy(lon: number, r: number, start: number): [number, number] {
export function xy(lon: number, r: number, start: number): [number, number] {
const a = ((180 + lon - start) * Math.PI) / 180;
return [C + r * Math.cos(a), C - r * Math.sin(a)];
}
const f = (n: number) => n.toFixed(2);
export const f = (n: number) => n.toFixed(2);
/** Pushes glyphs apart so that neighbours are at least `min` degrees from each other. */
function spread(lons: number[], min: number): number[] {
export function spread(lons: number[], min: number): number[] {
const n = lons.length;
const order = lons.map((_, i) => i).sort((a, b) => lons[a] - lons[b]);
const pos = order.map((i) => lons[i]);
@@ -73,7 +73,7 @@ function spread(lons: number[], min: number): number[] {
return out;
}
function arcPath(r1: number, r2: number, from: number, to: number, start: number): string {
export function arcPath(r1: number, r2: number, from: number, to: number, start: number): string {
const [x1, y1] = xy(from, r2, start);
const [x2, y2] = xy(to, r2, start);
const [x3, y3] = xy(to, r1, start);