Detailed analysis button, loading wheel, birth data change limits
CI / test (push) Successful in 41s
CI / build (push) Successful in 4m11s
CI / deploy (push) Skipped

Backend:
- own birth data: three corrections within an hour of the first save,
  then one change per 24 hours (birth_data_changes); 429
  birth_data_change_limit with the user-facing message; /v1/me
  birth_change shows the notice; admins are not limited
- admins get detailed analyses free (no unit spent)
- POST /v1/payments/mock (MOCK_PAYMENTS): stand-in payment that adds a
  unit, until Stripe is connected; on in the compose files for now

Frontend:
- detailed analysis offer: admin starts it free, users with units
  confirm, others go through the (stand-in) payment step
- turning wheel with elapsed time while the summary or the analysis is
  being written
- no "adatok javítása" on the chart page (only in the profile), limit
  notice there; wheel hover highlighting removed

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 06:45:33 +00:00
co-authored by Claude Opus 5.5
parent 85337f2c79
commit e5cfbd6cdd
23 changed files with 544 additions and 110 deletions
@@ -19,8 +19,19 @@ export interface SavedBirth {
dst: boolean;
}
/** Shows the saved birth data, or the form to enter or correct it. Saving opens the chart page. */
export function BirthEditor({ chart, chartId }: { chart: SavedBirth | null; chartId: string | null }) {
/**
* Shows the saved birth data, or the form to enter or correct it. Saving opens
* the chart page. `notice`: the backend's text about the change limit, if any.
*/
export function BirthEditor({
chart,
chartId,
notice,
}: {
chart: SavedBirth | null;
chartId: string | null;
notice: string | null;
}) {
const router = useRouter();
const [editing, setEditing] = useState(chart === null);
@@ -38,6 +49,7 @@ export function BirthEditor({ chart, chartId }: { chart: SavedBirth | null; char
időszámítást) a születési hely alapján magunk határozzuk meg.
</p>
)}
{chart && notice && <p className="msg">{notice}</p>}
<BirthForm
initial={chart ? { ...chart.birth, placeName: chart.placeName, region: chart.region } : null}
onCancel={chart ? () => setEditing(false) : undefined}
@@ -87,6 +99,7 @@ export function BirthEditor({ chart, chartId }: { chart: SavedBirth | null; char
</button>
</div>
</div>
{notice && <p className="hint">{notice}</p>}
</div>
);
}
@@ -73,6 +73,7 @@ export default async function ProfilePage() {
: null
}
chartId={chart?.id ?? null}
notice={me.birth_change.notice}
/>
</section>
</main>