Files
BFlat 8da68b009c Desktop create pages redesign: shared generation feed, embedded model selector, gallery folders sidebar (#1635)
## Summary

Reworks the desktop (Tauri) app's Create Image / Create Video pages to
match the webapp,
extracts the webapp's generation gallery into a shared library used by
both apps, embeds the
model selector into every prompt box, adds a folders sidebar + marquee
selection to the gallery
modal, restyles the login/pricing/credits modals to the webapp look, and
turns the Apps page
into the default landing tab.

### Shared generation-list lib

- Extracted the webapp's generation feed into
`@storyteller/ui-generation-list`: list + masonry
grid views, pending/failed/completed rows and cards, thumbnail handling,
gallery/prompt data
hooks, and the shared grid/list view store + toggle. Host-specific
actions (recreate,
make-video, share, download, toasts) inject via render props — webapp
markup unchanged, its
  old files are now thin wrappers.

### Desktop create pages

- Prompt box fixed at the bottom, `max-w-5xl` like the webapp; pages
renamed to
  "Create Image" / "Create Video".
- Generation feed: in-progress/failed from the Tauri task queue, history
from the library API,
rendered as grid or list (toggle in the TopBar next to credits). Typed
Tauri completion events
  push finished media in instantly; the poll reconciles and dedupes.
- Row/card quick actions (recreate, make video, copy link, download)
backed by a shared
  `desktopMediaActions` module extracted from the TopBar gallery wiring.
- Hero + background act as a splash that fades when the feed loads;
bottom gradient behind the
prompt box. Batch generations show "Generating N images" on the single
pending chip.
- Video prompt box now expands vertically as far as the image prompt box
(viewport-relative).

### Embedded model selector

- `ClassyModelSelector` gained `variant="embedded"`: a compact pill that
opens the webapp-style
rich-list popover while keeping the desktop's provider selection.
Embedded on all five
prompt-input pages; floating selectors removed; legacy "10 sec." badges
dropped.

### Gallery modal

- Left sidebar lists the user's folders (drag-and-drop, right-click
management, new-folder
button) and shows on the Folders tab too, highlighting the active
folder's root branch.
- Marquee (drag-rectangle) selection in view mode, with edge
auto-scroll; starts only on blank
  background so it doesn't interfere with drag-to-folder/canvas.

### Restyled modals (desktop)

- Login/signup: webapp 2-column layout (form left, Vimeo showcase
right), no Google button
(Google auth isn't wired for Tauri), `artcraft-icon` logo, eye toggles.
The dismiss button is
removed so login is required; the post-auth Discord + Success onboarding
steps are kept, as is
  the existing Tauri auth flow.
- Pricing + credits: match the webapp visually (unified monochrome plan
cards with
Most Popular / Best Value highlight frames; `#161618` credit-pack cards
with Popular badge).
All billing stays on the existing Tauri `invoke` calls — no billing
logic changed.

### Apps page / navigation

- The Apps page is now the first tab and the default landing tab, with a
Home icon. Restyled to
the webapp home: "What will you craft today?" hero, Create / Edit
sections, gradient-hover
cards sized to their content, full-width scrollbar. The TopBar
quick-menu header reads
  "Create" instead of "Generate".

### Fixes

- Video Editor no longer crashes on the desktop app (`Tooltip must be
used within
TooltipProvider`): the editor shell now mounts its own Radix
`TooltipProvider`. The webapp got
one app-wide via `SidebarProvider`; the Tauri app had none, so panel
tooltips threw.

### Misc

- `getCreatorIconPathForModelId()` added to `@storyteller/model-list`
(model id → creator icon
  path, desktop/webapp aware).
2026-06-13 17:25:40 -04:00
..
…
…
…
…
…

Storyteller GGF

Coding Rules and Styles

Short Style Guide TS React and Engine:

No use of lets

No basic for loop operators.
Use the collection operators and array operators.

React Side / No modules over 200 lines. ( loose rule )

Don't do:
if (condition) return;

Do:
if (condition) {
	return;
}

No use of any type.
If you can use chat gpt to create the interface.

Branches

  • main - The main branch is the production source of truth.

    Changes to main will automatically build, but will not auto-deploy to production. You'll have to promote changes to production using the Netlify control panel.

    Merge your code to main frequently. If you have to have a long-lived set of changes, ask yourself whether it might be better to feature flag your code off and land it to main rather than fight rebasing against the whole team.

  • studio-staging - The staging auto-deploy branch.

    You do not ever need to interact with this branch. Changes to main will automatically be pushed to studio-staging and auto-deployed to https://studio-staging.studio.storyteller.ai . You can test changes that have landed in main here before promoting them to production.

  • studio-testing - The testing branch.

Anyone can push their changes to this branch for testing in a production-like environment. Since it is built and hosted on https://studio-testing.studio.storyteller.ai , you won't face CORS issues, same-site cookie issues, or have to use a local development proxy. (This doesn't obviate the need for a development proxy for fast development iteration, but is a fantastic way to test your changes in a "production-like" environment.)

Force push to this branch by using git push -f origin studio-testing

API Docs

Server API docs live here: https://storyteller-docs.netlify.app/

Local Testing & Development

Apple Silicon package installation issues

Installation of some dependencies via npm may fail on M-series macs (like node-canvas) and may require additional setup including python3 and some brew dependencies:

brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman python-setuptools

Set up .env and the Proxy Server

Copy & paste the env settings from .env-local-proxy to .env, (if the file .env do not exist, simply create one at the root of this project's folder beside the other env settings files).

The settings from .env-local-proxy directs all requests to localhost:3000, this will relieve us from having to deal with CORS between various services.

Then, start the proxy server in the folder /proxy. Before running the proxy for the first time, run:

npm i

To start the proxy run:

npm run dev

If the proxy fails, make sure your node version is 18.18. If you need to change the node version run npm rebuild once before re-running npm run dev

Run the Code Locally

To setup and run this project's code locally:

npm install
npm run dev

PostHog

PostHog is installed and working. To create a feature flag go to https://us.posthog.com/project/75284/feature_flags Add the feature flag for all users.

To check the feature flag in the app use code similar to this

import { usePosthogFeatureFlag } from "~/hooks/usePosthogFeatureflag";
import { FeatureFlags } from "~/enums";

const Component = () => {
  const flag = usePosthogFeatureFlag(FeaturesFlags.FLAG_NAME);
  // if flag is true, the feature shoud be executed & showed;
  // if flag is false, the feature should be disabled & hid;
  // for example
  return(
    <>
      {flag && <ComponentThatDependsOnTheFlag />}
    </>
  );
};

Other Documentation

Here is the Swagger documentation for the backend endpoints

This project uses Remix for routing and Tailwind for styling:

On Netlify, we use functions: