Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6563cc2
feat(galerkin): add Galerkin BVP solver core ✨
hexjasur Nov 25, 2026
599b151
feat(galerkin): add step-by-step Galerkin solver page ✨
hexjasur Nov 25, 2026
42db646
feat(galerkin): register Galerkin method in navigation and hub ✨
hexjasur Nov 25, 2026
b8c522b
fix(theme): animate both theme directions and reduce toggle cost 🐛
hexjasur Nov 25, 2026
8389273
style(dashboard): compact workspace status cards on mobile 🎨
hexjasur Nov 25, 2026
fe1f2fe
style(dashboard): fix container max-width and tighten panel header on…
hexjasur Nov 25, 2026
00e35ef
perf(ui): remove fixed background and narrow card transitions ⚡️
hexjasur Nov 25, 2026
bc37b9c
feat(galerkin): simplify input to notebook-style defaults ✨
hexjasur Nov 25, 2026
be4f73a
feat(galerkin): empty form on load, a2 coefficient and sample button ✨
hexjasur Nov 25, 2026
c51c2df
feat(galerkin): build phi0 automatically from boundary values ✨
hexjasur Nov 25, 2026
d43b7b6
fix(galerkin): clean phi0 and approximation sign formatting 🐛
hexjasur Nov 25, 2026
2627f85
style(galerkin): compact centred input form 🎨
hexjasur Nov 25, 2026
35288e5
fix(galerkin): accept Pi in any capitalisation 🐛
hexjasur Nov 25, 2026
d331439
feat(galerkin): add blackboard method option to match classroom solut…
hexjasur Nov 25, 2026
8f7927c
feat(splash): animate logo mark as a loading splash screen ✨
claude Nov 27, 2026
fa06afd
fix(splash): hide page scrollbar while splash is shown 🐛
claude Nov 27, 2026
467f695
Merge pull request #26 from hexjasur/feat/splash-logo-animation
hexjasur Nov 27, 2026
948a1a2
feat(galerkin): compute φ₀ and basis automatically from the problem ✨
claude Nov 27, 2026
30d84ff
fix(galerkin): accept cosx, sinx and other function names without bra…
claude Nov 27, 2026
2cd2477
fix(galerkin): cosx syntax, plain TeX and hidden unit coefficients 🐛
claude Nov 27, 2026
e67e7be
feat(i18n): localize Galerkin page and solver errors to uz, en, ru ✨
claude Nov 27, 2026
70d48e5
fix(math): accept sinx-style function calls in every method 🐛
claude Nov 27, 2026
8d7dda1
fix(i18n): open in Uzbek by default instead of browser language 🐛
claude Nov 27, 2026
20946bc
feat(galerkin): add Legendre-type basis option for Dirichlet problems ✨
claude Nov 28, 2026
2d8da44
fix(galerkin): round formulas to chosen precision and expand final uₙ 🐛
claude Nov 28, 2026
e35d878
refactor(collocation): move input panel above results like Galerkin 🎨
claude Nov 28, 2026
69130d4
feat(collocation): live preview of the problem while typing ✨
claude Nov 28, 2026
af3d55a
refactor(sweep): remove copy, PNG and CSV export block 🧹
claude Nov 28, 2026
fba2eed
feat(about): show author photo in the author card ✨
claude Nov 28, 2026
98ffd24
chore(about): silence img warning for the remote avatar 🔧
claude Nov 28, 2026
9c39582
feat(sweep): share dialog with an optional note in the link ✨
claude Nov 28, 2026
ae69438
feat(about): local author photo and contact-page link 🎨
claude Nov 28, 2026
cdfea48
style(share): floating neutral toast for the shared note 🎨
claude Nov 28, 2026
4cdbc2f
style(share): theme-aware toast with the loader gradient 🎨
claude Nov 28, 2026
50f4288
Merge pull request #27 from hexjasur/feat/sweep-share-about-note
hexjasur Nov 28, 2026
fee17ff
Merge pull request #28 from hexjasur/feat/galerkin-legendre
hexjasur Nov 28, 2026
ac23acb
docs(agents): add pull request description guidelines 📝
claude Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,29 @@ refactor(plot): extract QuadraturePlot into shared integration component ♻️

<!-- BEGIN:nextjs-agent-rules -->

### Pull request descriptions

- **Title:** the same Conventional Commits form as the commit subject, e.g. `feat(galerkin): Legendre basis option`. Keep it under 70 characters.
- **Body:** use these sections in order. Leave out a section only if it truly does not apply.

```md
## Summary
One or two sentences: what changes for the user or the codebase, and why.

## Changes
- Bullet per user-visible change, or per notable code change.

## Testing
- Commands run and their result (`bun run lint`, `bun run build`, `bunx tsc --noEmit`).
- Manual checks done in the browser, and any that are still open.

## Notes
Base branch, follow-ups, screenshots, or anything a reviewer must know.
```

- Write for a reviewer who has not seen the conversation. Say what was not verified.
- Keep it short. A PR with more than about ten bullets should be split.

## This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
Expand Down
50 changes: 50 additions & 0 deletions app/(workspace)/methods/galerkin/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import type { Metadata } from 'next';
import { GalerkinMethod } from '@/components/galerkin-method';
import { MethodJsonLd } from '@/components/seo/json-ld';
import { siteConfig } from '@/lib/config';

export const metadata: Metadata = {
title: 'Galerkin Method | Метод Галеркина | Galyorkin usuli',
description:
'Solve second-order linear boundary value problems step by step with the Galerkin method. Метод Галеркина для краевой задачи. Galyorkin usuli bilan chegaraviy masalani bosqichma-bosqich yeching.',
keywords: [
'galerkin method',
'galerkin boundary value problem',
'boundary value problem solver',
'second order ODE solver',
'numerical methods',
'метод галеркина',
'краевая задача метод галеркина',
'galyorkin usuli',
'chegaraviy masala galyorkin',
],
alternates: { canonical: '/methods/galerkin' },
openGraph: {
title: 'Galerkin Method Solver | Метод Галеркина',
description:
'Build basis functions, Galerkin integrals, and a linear system for a second-order boundary value problem.',
url: `${siteConfig.url}/methods/galerkin`,
images: [{ url: '/images/og/collocation.png', width: 1200, height: 630, alt: 'Galyorkin usuli' }],
},
twitter: {
card: 'summary_large_image',
title: 'Galerkin Method | Метод Галеркина',
description: 'Step-by-step Galerkin solution of a second-order boundary value problem.',
images: ['/images/og/collocation.png'],
},
};

export default function GalerkinPage() {
return (
<>
<MethodJsonLd
name="Galerkin Method Boundary Value Problem Solver"
alternateName="Метод Галеркина | Galyorkin usuli | Galerkin method ODE solver"
description="Step-by-step Galerkin solution of a second-order linear boundary value problem. Метод Галеркина для краевой задачи. Galyorkin usuli bilan chegaraviy masala."
path="/methods/galerkin"
formula="u'' + p(x)u' + q(x)u = f(x)"
/>
<GalerkinMethod />
</>
);
}
50 changes: 47 additions & 3 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@
body {
margin: 0; min-width: 320px;
background: var(--page-glow), var(--bg);
background-attachment: fixed;
color: var(--ink);
font-family: var(--font-sans);
transition: background .2s ease, color .2s ease;
}
button, input { font: inherit; }
button { cursor: pointer; }
Expand Down Expand Up @@ -151,7 +149,6 @@
::view-transition-new(root) {
z-index: 9999;
}
/* When transitioning to dark, we can either expand the new dark theme, or shrink the old light theme */

/* Print Stream Navigation Top Loader */
#nprogress {
Expand Down Expand Up @@ -217,3 +214,50 @@
}
}


/* Splash screen — logo mark animation */
.splash-draw {
stroke-dasharray: 1;
stroke-dashoffset: 1;
animation: splash-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0s) forwards;
}

.splash-fill {
opacity: 0;
animation: splash-fade 0.6s ease var(--d, 0s) forwards;
}

.splash-pop {
opacity: 0;
transform-box: fill-box;
transform-origin: center;
animation: splash-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s) forwards;
}

@keyframes splash-draw {
to { stroke-dashoffset: 0; }
}

@keyframes splash-fade {
to { opacity: 1; }
}

@keyframes splash-pop {
from { opacity: 0; transform: scale(0); }
to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
.splash-draw,
.splash-fill,
.splash-pop {
animation: none;
stroke-dashoffset: 0;
opacity: 1;
}
}

/* Hide the page scrollbar while the splash screen is mounted */
html:has(#app-splash) {
overflow: hidden;
}
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata, Viewport } from "next";
import "./globals.css";
import { I18nProvider } from "@/components/i18n-provider";
import { TopLoader } from "@/components/top-loader";
import { SplashScreen } from "@/components/splash-screen";
import { siteConfig } from "@/lib/config";
import { RootJsonLd } from "@/components/seo/json-ld";

Expand Down Expand Up @@ -136,6 +137,7 @@ try {
/>
</head>
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<SplashScreen />
<TopLoader />
<I18nProvider>
{children}
Expand Down
21 changes: 15 additions & 6 deletions components/about-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ExternalLink,
FileCode2,
Globe,
GraduationCap,
Layers,
LineChart,
Mail,
Expand Down Expand Up @@ -202,9 +201,17 @@ export function AboutPage() {
<PsPanelHead eyebrow={t('about.author_eyebrow')} title={t('about.author_title')} idx="01" />

<div className="grid grid-cols-1 lg:grid-cols-[120px_1fr] gap-6 items-start">
<div className="w-24 h-24 rounded-2xl bg-brand-soft border border-brand/30 text-brand grid place-items-center shrink-0 shadow-sm">
<GraduationCap size={44} />
</div>
{/* Static export serves the photo from public/, so a plain img is used */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src="/images/author.jpg"
alt={t('about.author_name')}
width={96}
height={96}
loading="lazy"
decoding="async"
className="w-24 h-24 rounded-2xl border border-brand/30 object-cover shrink-0 shadow-sm"
/>

<div className="space-y-4">
<div>
Expand Down Expand Up @@ -247,11 +254,13 @@ export function AboutPage() {
</a>

<a
href="mailto:jasurhaydarovcode@gmail.com"
href="https://jasurdev.uz/contact/"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-2 px-3.5 py-2 rounded-lg border border-line bg-panel hover:bg-brand-soft hover:border-brand/40 text-ink text-xs font-semibold transition-all"
>
<Mail size={14} className="text-brand" />
<span>{t('about.contact_email')}</span>
<span>{t('about.contact_message')}</span>
</a>

<a
Expand Down
9 changes: 9 additions & 0 deletions components/app-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
ArrowUpRight,
BookOpenText,
Orbit,
Layers,
ExternalLink,
Info,
LayoutDashboard,
Expand Down Expand Up @@ -152,6 +153,12 @@ export function AppShell({
icon: Orbit,
isNew: true,
},
{
href: '/methods/galerkin',
label: t('nav.galerkin'),
icon: Layers,
isNew: true,
},
];

const sortedMethods = [...methodItems].sort((a, b) => {
Expand Down Expand Up @@ -201,6 +208,8 @@ export function AppShell({
? t('nav.bvp')
: pathname.startsWith('/methods/collocation')
? t('nav.collocation')
: pathname.startsWith('/methods/galerkin')
? t('nav.galerkin')
: pathname.startsWith('/methods/sweep')
? t('nav.sweep')
: pathname.startsWith('/methods/lagrange')
Expand Down
45 changes: 42 additions & 3 deletions components/collocation-method.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import {
type CollocationResult,
} from '@/lib/collocation';
import { useI18n } from '@/components/i18n-provider';
import {
exprTex,
operatorLhsTex,
type TexTerm,
} from '@/lib/galerkin';

const INITIAL: CollocationInput = {
a2: '1',
Expand All @@ -41,6 +46,31 @@ function tex(value: string): string {
return value.replaceAll('*', '\\,').replaceAll('~', '').replaceAll('u', 'u');
}

// Live LaTeX of the typed problem; empty fields fall back to the defaults used by the solver
function fieldTerm(source: string, fallback: string): TexTerm {
if (!source.trim()) return { tex: fallback, atomic: true };
try {
return exprTex(source);
} catch {
return { tex: '\\text{?}', atomic: true };
}
}

function problemTex(input: CollocationInput): string {
const lhs = operatorLhsTex(
fieldTerm(String(input.a2), '1'),
fieldTerm(String(input.a1), '0'),
fieldTerm(String(input.a0), '0'),
);
return `${lhs}=${fieldTerm(String(input.f), '0').tex}`;
}

function boundaryTex(input: CollocationInput): string[] {
const left = `${fieldTerm(String(input.alpha0), '1').tex}u(a)+${fieldTerm(String(input.alpha1), '0').tex}u'(a)=${fieldTerm(String(input.alphaValue), '0').tex}`;
const right = `${fieldTerm(String(input.beta0), '1').tex}u(b)+${fieldTerm(String(input.beta1), '0').tex}u'(b)=${fieldTerm(String(input.betaValue), '0').tex}`;
return [left, right];
}

function formatApproximation(value: number): string {
return Number(value.toFixed(8)).toString();
}
Expand Down Expand Up @@ -263,14 +293,23 @@ export function CollocationMethod() {
},
]}
/>
<div className="grid min-w-0 items-start gap-[18px] lg:grid-cols-[minmax(280px,340px)_minmax(0,1fr)]">
<aside className="min-w-0 space-y-[18px] lg:sticky lg:top-[88px] lg:max-h-[calc(100dvh-104px)] lg:overflow-y-auto lg:overscroll-contain lg:pr-1">
<div className="min-w-0 space-y-[18px]">
<aside className="mx-auto w-full min-w-0 max-w-3xl space-y-[18px]">
<PsPanel>
<PsPanelHead
eyebrow={t('collocation.input_eyebrow')}
title={t('collocation.input_title')}
idx="01"
/>
<div className="mb-4 space-y-1 overflow-x-auto rounded-lg border border-line bg-bg-2 px-3 py-2">
<MathDisplay value={problemTex(input)} />
{boundaryTex(input).map((line, index) => (
<MathDisplay key={index} value={line} />
))}
<p className="text-center font-mono text-[11px] text-muted">
[{String(input.a)}, {String(input.b)}]
</p>
</div>
<form onSubmit={calculate} className="space-y-4">
<p className="text-xs leading-relaxed text-muted">
{t('collocation.input_hint')}{' '}
Expand Down Expand Up @@ -321,7 +360,7 @@ export function CollocationMethod() {
<p className="mb-2 text-xs font-semibold text-ink">
{t('collocation.points_title')}
</p>
<div className="space-y-2">
<div className="grid grid-cols-2 gap-2 sm:grid-cols-4">
{input.points.map((point, index) => (
<input
key={index}
Expand Down
26 changes: 14 additions & 12 deletions components/dashboard/dashboard-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function DashboardView() {
];

return (
<div className="relative ax-w-290 mx-auto px-4 pb-12">
<div className="relative max-w-290 mx-auto px-4 pb-12">
<PsStrip eyebrow="DSH-000" id="MAIN" name={t('dashboard.strip')} />

<PsHero
Expand All @@ -46,25 +46,27 @@ export function DashboardView() {
title={t('dashboard.overview')}
idx="SYS"
/>
<div className="grid grid-cols-1 md:grid-cols-3 gap-[14px]">
<div className="grid grid-cols-1 md:grid-cols-3 gap-2.5 md:gap-[14px]">
{stats.map(([number, label, value, mark]) => (
<article
className="relative min-h-[140px] rounded-lg border border-line bg-bg-2 p-5 shadow-sm transition-all hover:-translate-y-1 hover:shadow-md hover:border-brand"
className="relative flex items-center gap-3 rounded-lg border border-line bg-bg-2 px-3.5 py-3 shadow-sm transition-[transform,box-shadow,border-color] duration-200 hover:-translate-y-1 hover:shadow-md hover:border-brand md:block md:min-h-[140px] md:p-5"
key={number}
>
<span className="font-mono text-[11px] font-bold text-brand bg-brand-soft py-1 px-1.5 rounded">
<span className="shrink-0 font-mono text-[11px] font-bold text-brand bg-brand-soft py-1 px-1.5 rounded md:inline-block">
{number}
</span>
<span className="absolute right-[20px] top-[20px] rounded border border-line px-1.5 py-1 font-mono text-[11px] font-bold text-muted bg-panel">
<div className="min-w-0 flex-1 md:mt-8">
<small className="block truncate font-mono text-[10px] md:text-[11px] font-semibold tracking-wider uppercase text-muted">
{label}
</small>
<strong className="mt-0.5 block text-base font-bold tracking-tight text-ink md:mt-2 md:text-xl">
{value}
</strong>
</div>
<span className="shrink-0 rounded border border-line px-1.5 py-1 font-mono text-[11px] font-bold text-muted bg-panel md:absolute md:right-[20px] md:top-[20px]">
{mark}
</span>
<small className="mt-8 block font-mono text-[11px] font-semibold tracking-wider uppercase text-muted">
{label}
</small>
<strong className="mt-2 block text-xl font-bold tracking-tight text-ink">
{value}
</strong>
<span className="absolute bottom-[22px] right-[20px] text-brand opacity-60">
<span className="hidden text-brand opacity-60 md:absolute md:bottom-[22px] md:right-[20px] md:block">
↗
</span>
</article>
Expand Down
Loading
Loading