Commit Graph

34 Commits

Author SHA1 Message Date
Amiram_se c6da027450 feat(dashboard): show audience and income on the overview tab
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>
2026-11-05 19:06:19 +04:00
Amiram_se 69a76446d2 feat(dashboard): add the signal performance card to the signals tab
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>
2026-11-02 01:58:25 +04:00
Amiram_se cac4f8e229 feat(signals): add exact or range entry and required stop-loss to the composer
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>
2026-11-02 01:41:04 +04:00
Amiram_se 01c838e869 feat(legal): add rules caption, analyst agreement and re-acceptance gate
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>
2026-11-02 01:28:42 +04:00
Amiram_se 684aa404f2 feat(island): add on-dark and following button variants
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>
2026-11-02 01:09:08 +04:00
Amiram_se 4ae62a96e1 feat(pwa): add iOS splash screens to bull and bear
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>
2026-10-25 16:18:41 +04:00
Amiram_se d31903b4c0 feat: update creator route 2026-10-16 15:30:43 +04:00
Amiram_se 8c300edf68 feat(admin): wall-street-plaza admin panel on garden-roof, bound to admin-api
- New admin app apps/wall-street-plaza (port 7002) and platform platforms/garden-roof
  (scope:admin), talking only to admin-api through the /api rewrite (decision 0061;
  0062 and 0063 proposed).
- All J11 sections: beta health, verifications, analysts, invite codes, subscriptions,
  predictions, payouts, featured; audit log, cross-section refresh, Persian-only errors.
- Admin login matches the uniform admin-api contract (one OTP_INVALID message, 429 wait,
  local code check); reason hints say who reads each reason.
- island: DataTable, Pager, PersonSummary, TabLinks count, StatTile footer; tools:
  exactDuration; market: subscription_extended/refunded notification icons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:06:38 +04:00
Amiram_se aec09a0ecd refactor: code review 2026-10-10 18:28:58 +04:00
Amiram_se 4924257ae1 feat(island): prediction card pending close, code input «کد ندارم», list row external links, subscription card latest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 13:29:48 +04:00
Amiram_se 3e0cf9628d feat(libs): pwa worker serves /_next/static/ cache first, evicts least recently used, routes only stored kinds through the fetch event, stores loaded files a few at a time
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:19:43 +04:00
Amiram_se 907bc23e25 feat(island,tools): share popover, 360 sheet popover, form section and avatar field options, switch frozen track, prediction card link, select, list row, tab links and info tip options, body-compact and stat type tokens, button document reload, list formatting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 19:34:24 +04:00
Amiram_se 75e8fe08fe feat(libs): pwa lib — service worker for JS, CSS, fonts and the icon sprite, registration kill switch, install offer capture
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:46:36 +04:00
Amiram_se d3137973ab feat(island): media strip, media frame with expand badge, list row keep-end, offline freeze, upload tile and toast placement follow-ups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:46:36 +04:00
Amiram_se c6c1aa33b2 feat(island): v6 compositions — list rows, page header, section title, pinned footer, result panel, stat tile, meter, search field, avatar stack, timeline, code input, key-value, analyst card; new chips, segmented, avatar sizes, toast placement, account menu items, post and prediction card names and close reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:38:43 +04:00
Amiram_se db0fa7c86e feat(island,tools): select, switch, info tip, jalali date helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:11:12 +04:00
Amiram_se a668b17590 feat(island): count badge, date time, detail row, filter chips, spinner sizes, carousel nav buttons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:36:22 +04:00
Amiram_se 2be04f9d1d feat(island): landing type, tokens, section heading, sample frame, fact card
Add the landing's own display type (hero and section Typography variants),
a page container, an image shade and a 720px tablet breakpoint used only by
the landing's grids (0028). Add three domain-free molecules the landing
shares: SectionHeading, SampleFrame (real components with made-up data,
inert and labelled) and FactCard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:02:58 +04:00
Amiram_se 88384fa72d feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.

- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:29:33 +04:00
Amiram_se f4e9febad7 feat(island): toast close button, own motion and clock, one at a time
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>
2026-10-06 22:42:11 +04:00
Amiram_se 0e8347d6d3 refactor(libs): share the origin env schema
`origin` (scheme and host only) lives in @lumina/libs/env, so the apps stop repeating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:18 +04:00
Amiram_se 297f0b2cbd feat(island): focusable choice cards and file fields, state skeleton, timed toasts
- ChoiceCard and FileField forward a ref to their real input, so a form can move focus to the first empty card or upload box.
- SkeletonPreset gains a `state` preset (art, heading, line, action).
- Every toast closes by itself: errors after 8 s (10 with an action), others after 4 s (6 with an action).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:18 +04:00
Amiram_se cfa8cce1b0 refactor: code review 2026-10-06 17:12:50 +04:00
Amiram_se 9216bc8177 feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
  under a group), LinkButton (a button that looks like a link; SupportLink now
  uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
  (titled form part with an optional marker and hint), AvatarField (photo
  pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
  the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:32:43 +04:00
Amiram_se 025c68dd0d feat(island): file field, form skeleton, toast details and link start icon
- FileField molecule: one file for a form, with a picker box, thumbnail,
  name, size, remove button, inline error and upload progress.
- SkeletonPreset gains a `form` preset (heading, n fields, button, link).
- Toast takes a second `description` line; showToast takes a stable `id`,
  so a repeated failure replaces its toast instead of stacking.
- Link takes a leading `iconStart`, such as edit before «ویرایش شماره».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:06:42 +04:00
Amiram_se 86944adb97 feat(island,apps): serve fonts and icon sprite under fixed names
Replace the hashing asset plugin with two build-time plugins that never
rename their files, so an unchanged font or sprite stays in every
visitor's cache across deploys (0011, 0012):

- icon-sprite-plugin builds icons/*.svg with svgo into
  public/icons/symbol-defs.svg. The Icon atom links it as
  symbol-defs.svg?v=<ICON_SPRITE_VERSION>; the file's first line stamps
  its version, so dev warns when the sprite changes without a bump.
- font-copy-plugin copies island fonts/ byte for byte into public/fonts/
  and warns when a font changes under its old name.
- island fonts.css declares both Yekan Bakh faces with root paths and a
  fallback face; theme.css points font-sans and font-latin at them.
- Root layouts preload CRITICAL_FONT_URL. next/font is gone.
- Both apps serve /fonts and /icons as immutable.
- island env, the apps' island-env bootstrap, NEXT_PUBLIC_ISLAND_* and
  NEXT_PUBLIC_CDN_ORIGIN are removed; paths live in island constants.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:00:46 +04:00
Amiram_se 0bee35290d refactor(island): move dialog to atoms, modal and sheet to molecules
Imports and the root index follow the new paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:00:28 +04:00
Amiram_se bbf84069c9 feat(island,apps): island asset plugin writes hashed fonts and icon sprite
Add withIslandAssets (island tools/asset-plugin) per ADR 0008. On next dev
and next build it builds the svgo sprite from src/icons and copies the
Yekan Bakh fonts into the app's public/ under content-hashed names, puts
their paths in env (NEXT_PUBLIC_ISLAND_*) and serves them with an
immutable Cache-Control. Files are written in headers(), which only Next
calls, because Nx's next plugin also evaluates the config from the
workspace root.

- island env (setEnv/getEnv); Icon reads the sprite path from it
- icon-sprite-plugin becomes icon-name-extraction (IconName type only);
  the committed sprite.svg is removed
- bull and bear register the plugin, validate the paths, pass them to
  island through their bootstraps, and add an optional CDN origin for fonts
- gitignore the generated files; Nx build outputs include them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 11:58:56 +04:00
Amiram_se cd082e5ed9 feat(libs,island): carry API error details and let fallbacks focus their heading
- HttpError keeps the server's structured `details` (set by mapErrorBody), so
  callers can read a changed price or a frozen unfollow
- ErrorState and StateMessage accept a headingRef; page fallbacks move focus to it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 21:33:07 +04:00
Amiram_se d68ae9d0a4 feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset

Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP

Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
  panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
  ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
  the spinner keeps turning under reduced motion

Adds sonner and svgo; island gets the icons target and the hooks subpath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:23:59 +04:00
Amiram_se 368c49ce67 feat(tools): align format helpers with the Lumina design system
- number/signed/signedPercent no longer print −0 or a sign for values that round to zero
- price guards null/NaN, caps at 6 decimals and avoids exponent notation
- date uses the fixed «، ساعت» joiner; relative says «همین الان» under a minute
- sheba groups as banks print it with or without the IR prefix
- add duration() and horizon(); export clock from the package root

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:23:59 +04:00
Amiram_se 5e35fbd6f2 feat: libs, tools 2026-10-02 19:42:11 +04:00
Amiram_se 486f86fcea fix: gitignore 2026-10-02 19:30:30 +04:00
Amiram_se 7dde8dd6f8 feat: scaffold 2026-10-02 18:19:11 +04:00