Keeps tile tips on the label's line, moves the share button under the banner
text on a phone, and records the new default tab, the overview and the
subscriber list in the decisions and page docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plans tab loses «مخاطبان», whose figures now live on the overview, and
shows the soonest-ending subscribers instead. /dashboard/subscribers lists them
all with «همه» and «در حال انقضا»; notifications may now open it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no audience and no income yet, the figures stay at zero and a banner
offers to share the channel, through the caption sheet the channel's own share
uses. A channel that isn't public yet says why it can't be shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The four numbers and the way to a public record, from the snapshot the
signals tab reads, so the two can't disagree. Before the first evaluation it
shows the same message in their place, never zeros.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
«تفکیک طرحها» draws one bar per plan by active subscribers, every purchase
or income, with count and share. A refunded plan's negative income takes no
share from the others.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Followers, active subscribers and those ending within a week, then total,
this Shamsi month's and payable income, with their links.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds /dashboard/overview to both apps, with its read of the API's overview
and subscriber list routes. The tab row is now «نمای کلی» · «طرحهای اشتراک» ·
«سیگنالها» · «مالی», and the nav's داشبورد opens it for a creator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API refuses the first profile completion without termsAccepted, and the
web app never sent it, so no analyst could finish registering. The box now
always shows, with or without a link, and completing sends the consent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Until results reach the analyst the API answers one list for every status
and no per-status totals, so the signals tab drew each signal under both
sections and the full list drew empty filter counts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without entryType the API reads an exact entry, so every range signal from
the composer was refused with 422.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API sends a 5-digit sign-in code, but the code step drew six cells and
its validation wanted six digits, so nobody could sign in or register. The
admin panel keeps its 6-digit code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tab reads GET /me/signal-stats instead of the track-record route: four
tiles, how signals ended, risk to reward as worst to best, and progress to a
public record, with tips on this tab only. Before the first nightly
evaluation a message replaces the numbers, never zeros. The tiles, progress
and pending state are shared organisms, ready for the overview tab.
The channel's split now reads «رسیده به هدف», «خورده به حد ضرر» and «پایان
مهلت», since those three counts no longer mean win, loss and breakeven.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The editor reads the floor from the API, on the final price after any
discount, with the spec's hints and errors, and a tier the floor took off
sale stays editable through the 7-day lock. The plans tab marks those
tiers and links to the fix. Checkout, renew and reactivate handle 409
tier_unavailable. The admin panel gets «تنظیمات» with «کف قیمت اشتراک»: a
dry-run preview on a raise and a confirm with an audited reason. Removes
the stale esbuild key from the Vitest config.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The composer asks for the entry as «قیمت دقیق», prefilled from the live
quote until edited, or «بازه», plus a required stop-loss, and checks the
levels against that entry on blur, on a direction change and on every
quote refresh. The confirm step sends what it showed. The signal card
shows a range with «بازه» and «ورود (بازه)», measures from its middle,
and shows «ریسک به ریوارد» as lower to higher ratio.
Every UI string now says «سیگنال» in place of «پیشبینی». Code identifiers
and routes stay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reads the three legal documents from the API, so /terms and
/terms/subscription render in the browser under a (tabs) route group, and
adds /terms/analyst-agreement. The login and sign-up phone pages accept the
rules through a caption, the analyst sign-up requires the agreement and sends
its version, and a blocking gate opens from the session or a 403
agreement_required. Account rows and the rules_updated notification follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow controls use on-dark and following instead of secondary, on the
channel and in دنبالشدهها. Discovery shows a plain label for a followed
analyst and no longer offers unfollow. Adds Vitest and Testing Library,
the repo's first test runner, and the pre-launch plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pwa lib lists every iPhone and iPad screen and builds a portrait and a
landscape startup image for each. Both apps' root metadata links the images
and adds apple-mobile-web-app-capable, which Next.js 16 no longer renders.
tools/generate-splash-screens.ts draws each app's icon on the manifest
background with next/og; run it again when the icon, the background or the
screen list changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Channel, post, checkout and analysts read their data in the browser; the
server reads no back-end data outside the landing (0070).
- Only the landing is indexable; every other page is noindex, the rules
pages through the terms layout (0071).
- Remove the landing's loading.tsx so all of it renders in the first flush.
- Remove the server caches and metadata helpers nothing uses any more.
- Update the page rendering docs; 0021, 0045 and 0055 are superseded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- account: /account overview, investor profile form, notification settings (features/account, features/notification-settings)
- auth: board fixes, J03 creator profile edit with identity resubmission (features/verification), shared links section
- discovery: featured creators, creator search with recent searches, analysts directory, empty خانه, follow notice (features/discovery)
- channel and post: display names, follower counts, media frame, share, lightbox, desk back
- checkout: invite link codes kept per creator in the checkout draft, CodeInput field; subscriptions with amount paid and per-period history; transactions, following and notifications as list rows
- publishing: publish standing guard, idempotent publish, pinned composer footer, media strip
- predictions: composer with live quotes and server field codes, early close at the server quote, track record and own predictions (features/prediction)
- creator dashboard: three tabs, audience stats, invite-code card and capacity requests (features/referral), pricing, promotion, finance, ledger and شبا fixes
- errors: API error code reaches HttpError.code; page error keeps the page bar; session expiry keeps drafts; slow and offline states
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checkout draft store survives the bank round trip; the app shell settles an
abandoned payment on return. Renewal sheet lists periods as tier options.
Notification bell opens the centre as a panel on desktop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Landing screens for `/`: header, hero, trust strip, markets tabs,
featured analysts carousel, track record, steps, plans, for analysts,
FAQ, closing call to action and footer, composed by LandingTemplate
with labels built from the server's translations.
- Featured analysts read (`/creators/featured`) with a cache and
`loadLandingPage`: 404 and 403 hide the section, other failures hide
it at build time and throw at a revalidation.
- `ROUTES.home` is now `/feed` and `ROUTES.landing` is `/`; `homeRoute`
and `useHomeHref` decide where a viewer belongs, used by the brands,
back, HomeGuard and LandingRedirect.
- Registration step 1 pre-selects the account type from `?role=` once,
then drops it from the address.
- The `landing` namespace is server-only (SERVER_RESOURCES).
- Landing metadata and FAQPage JSON-LD helpers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The creator's channel and post pages, the post composer, the investor's home feed and the following tab, in bull and bear.
- Channel and post page start from the server's read and re-read in the browser for the creator or a subscriber; locked posts show a gate only once the viewer and their standing are known, frozen for another creator.
- Composer: text and up to four images uploaded as picked, free or premium, a device draft that keeps stored file URLs, 15-minute edit of a published post; on desktop a dialog over the page through bear's @modal intercept.
- Owner actions: preview as a visitor or subscriber, edit, delete (dialogs locked while sending), close a prediction with the outcome the API recorded.
- Follow and unfollow run in tap order; the home feed dates posts from its last read; paged lists read past pages with nothing to show.
- Cache stays true after mutations: a delete re-reads the channel's offset pages, a new post resets them, and a post page delete navigates without a stale refresh.
- Navigation: bottom nav, mobile top bar, desktop header and publish menu; the preview chrome only for the creator's own post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Toast follows the updated Lumina design system.
- ✕ «بستن اعلان» on every toast shown by showToast: 44px, its hit area reaching into the padding; the label comes from the Toaster's new `closeLabel`.
- Motion: in over 200ms (rise 16px, fade in), out over 160ms (drop 8px, fade out); reduced motion keeps a plain 120ms fade. The entrance plays once, even when the region moves into a dialog.
- Text wraps evenly; with an action, text past two lines moves the action under it, measured again when the width changes.
- Toast runs its own clock (sonner gets duration Infinity): it pauses while a pointer is on the region (hover, press, hold, swipe), while keyboard focus is inside it, and while the tab is hidden.
- One toast at a time: a new one replaces the old; while keyboard focus is in the region it waits until focus leaves. Every toast gets a fresh id, so `showToast` drops its `id` option.
- The Toaster slot overrides sonner's slide and stack with inline style instead of !important, and `toastOptions` is no longer a prop.
- market: AppShell passes `closeLabel`; showActionError no longer passes an id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Login, registration steps 1–4 and step 5 now follow the design (S6, R2-Register, R2-CompleteProfile).
- Login: hourly code limit and blocks open the code step with their wait; wrong-code message no longer replaced while retyping; suspended screen on its own route with the admin's reason; «log in to subscribe» variant.
- Registration: focus on the first card or empty upload box; typed number kept; «تمدید زمان» renews the token; live username check with ✓; leave prompt for in-app links; creator ID accepts PDF and maps server field errors.
- Step 5: square photo crop, stricter link rules, done screen on its own route; the session's `needsProfile` keeps unfinished creators out of publishing and pricing (OnboardingGuard) and sends them back to step 5 at login.
- Every auth and onboarding route has its own loading skeleton matching its frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- next.config rewrites /api/:path* to API_INTERNAL_ORIGIN, with a 120 s proxy timeout for uploads; NEXT_PUBLIC_API_ORIGIN is gone.
- The browser HTTP base is /api/v1; media, avatars and uploads load through /api (market env `apiBaseUrl`), so private media gets the session cookie.
- toApiUrl keeps a narrow rule for uploads stored with a host before the back end stored paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Creator (required, resumable) and investor (optional) profile steps, on the
session after registration step 4.
- Profile repository: `saveDraft` (PATCH /traders/me/profile, markets may be
empty) and `complete` (POST /traders/me/profile/complete).
- Account repository: avatar upload and removal, `interests`; the account
payload carries `avatarUrl` and `interests`.
- Actions: completeCreatorProfile (saves the form, then completes; emits
`profile.complete`) and saveInvestorProfile (photo with progress, then
markets; emits `auth.profile-saved`).
- Creator models: the page (form from the saved draft, links field array,
submit), autosave (1 s after typing and on blur, one save at a time, never
after completion), the photo part (uploads on pick, failed state with retry)
and the live preview.
- Investor model: photo and markets saved on «ذخیره و ورود», «بعداً» skips;
both land on ?redirect= or home with the welcome toast.
- The auth-flow store remembers the role registered in this tab, so step 5
shows the resume banner only after a login or a reload.
- Validations: photo, bio, link rows per platform, markets, consent.
Utils: social link handle and URL mapping, market toggle. PROFILE_LIMITS
moves to shared/validations.
- Screens: CreatorProfileStep (mobile column with a preview sheet, desktop
card beside a sticky preview, end-of-registration view) with its skeleton,
and InvestorProfileStep.
- Copy for step 5 in the auth namespace; market and status labels in common.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Registration step 5 lives under (onboarding), so the pieces both route groups
use move to the nearest level they share. No behavior change.
- SupportEntry and RegisterProgress move from screens/(auth) to
screens/organisms.
- bull's AuthTopBar and both apps' AuthTemplate move from the (auth) group to
the app root's organisms/ and templates/.
- MARKETS and Market move from the profile feature to shared/constants, so
features other than profile (the investor's interests) can use them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- auth-flow store: the number, code timing, misses, block, registration
token and step-4 draft, in memory only (never URL, cookie or storage).
- Auth repository maps the gateway's English error text to codes and
Persian copy (AUTH_ERROR_CODES, AUTH_ERROR_COPY, blockEndOf).
- Actions: sendCode, verifyRegistrationCode; login turns a suspended
account away and closes its session; register actions reset the flow and
creator registration reports upload progress and can be cancelled.
- Models: shared code step (wrong/expired codes, 3-miss block, resend),
login, login verify (landing per role and unfinished creator profile),
registration type, phone, verify and details (token warning and halt,
investor and creator parts).
- Screens under (auth): support entry, code step, login, login verify with
the suspended notice, registration progress and steps 1-4.
- Navigation: auth routes, withReturnPath and useAuthRoutes; GuestGuard keeps
the page through its own sign-in.
- Shared: valibot auth schemas (phone, code, names, username, national ID,
ID card image), showActionError, applyServerErrors, translateMessage,
mobile helpers, and the `auth` locale namespace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both apps had their own copy of the page error boundary. It now lives
once in platforms/market/src/app/screens/organisms/page-error, and every
route group's error.tsx re-exports it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server render no longer depends on auth: it reads no session and
forwards only FORWARDED_COOKIES (none today), so every visitor of a URL
gets the same HTML and the Next.js proxy is no longer needed.
- Remove proxy.ts from bull and bear, the app/session module, the
server auth and role guards, and the server caches that read the
viewer's own data. Public caches stay: channel, post, prediction stats.
- Add an auth store (status unknown | guest | member) filled by the
restoreSession action, which reads GET /auth/session once per load
from the AppShell's useSession hook.
- Login and register actions set the store, logout clears it; the
AppShell clears the query cache on auth.logout. No router.refresh.
- Add client AuthGuard (fallback, optional role) and GuestGuard, with
safeReturnPath limiting post-login redirects to same-site paths.
- readOnServer no longer redirects on 401.
- The browser HTTP client refreshes against AUTH_ENDPOINTS.refresh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>