Skip to content

feat(app): TRELLIS one-click 3D, paid remesh, English dashboard copy - #141

Merged
turer73 merged 5 commits into
masterfrom
claude/friendly-noether-48zugv
Oct 11, 2026
Merged

turer73 merged 5 commits into
masterfrom
claude/friendly-noether-48zugv

Conversation

@turer73

@turer73 turer73 commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

These are the follow-ups to #140, based on the owner's decisions.

Pricing

  • One-click 3D on the output and project pages now runs TRELLIS v1 (5 credits) instead of Meshy 6 (55). Higher-quality 3D stays in the workspace model picker.
  • Remesh is charged.
    • /api/jobs/remesh reserves REMESH_CREDITS before the fal call and refunds if the submission fails.
    • It answers 402 on a low balance, and settles the charge against the model's job once fal accepts.
    • The price is 4 credits, the same as TripoSR, because fal publishes no price for fal-ai/triposr/remeshing. It is set in one constant in src/lib/jobs/remesh-token.ts.

English dashboard copy

  • useLocaleText() / pickLocaleText() (src/hooks/use-locale-text.ts) put the TR and EN copy inline next to the markup. Turkish text is unchanged.

  • Workspace tool form:

    • tabs, model pickers, presets, logo and edit options
    • labels, placeholders, hints, credit badges and time labels ("~12 s")
    • toasts and buttons

    Values sent to the server are unchanged: model names, composed AI prompts, and the edit/logo labels used in prompts.

  • Gallery (relative times, tool names, menus, delete confirm), preview, layout toasts and banner, SRT voiceover result, output catalog, support chat and sidebar.

  • Image checks:

    • ImageInputIssue gains messageEn, built by positionedIssue and read through issueMessage.
    • The 422 preflight body passes it on, so server-side rejections show in English too.
    • limitsSummary, unverifiedLimitsNote and describeTransform take a locale, and the *Tr versions stay as wrappers.
    • Model advisories are { tr, en } pairs.
    • The image prepare and image error dialogs and the social-kit image notes are localized.
  • Product suggestions: product-intel category labels, rationale notes and tool suggestions have English versions.

Not changed: error text that comes back from the server's generic error responses is shown as received.

Test plan

  • tsc --noEmit and eslint clean
  • vitest run: 1153/1153. New tests:
    • remesh billing: reserve before the call, 402 on a low balance, refund when fal rejects
    • bilingual image copy: position prefix, locale pick and fallback, English limits summary, messageEn in the 422 body
  • next build compiles
  • Preview:
    • the output page 3D button shows 5 credits and produces a TRELLIS model
    • /en/app shows English in the form, gallery and dialogs
    • /tr/app is unchanged

🤖 Generated with Claude Code

https://claude.ai/code/session_011Aucau8tZkzFeA555Qzzb6

- The output/project page "process with 3D" action now runs TRELLIS v1
  (5 credits) instead of Meshy 6 (55); higher-quality 3D stays in the
  workspace model picker.
- /api/jobs/remesh reserves REMESH_CREDITS (4, priced like TripoSR since fal
  publishes no price for the endpoint) before the fal call, refunds when the
  submission fails, answers 402 on a low balance, and settles the charge
  against the model's job once fal accepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Aucau8tZkzFeA555Qzzb6
@vercel

vercel Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
renderhane Ready Ready Preview Oct 11, 2026 8:09pm UTC

Request Review

Hard-coded Turkish in the workspace gallery (incl. relative times and tool
names), preview, layout toasts/banner, SRT voiceover result, output catalog,
support chat and sidebar now follows the locale via useLocaleText /
pickLocaleText. Turkish text is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Aucau8tZkzFeA555Qzzb6
Tabs, model pickers, presets, logo/edit options, field labels, placeholders,
hints, credit badges, time labels, toasts and button labels in the tool form
now follow the locale. Values sent to the server (model names, composed AI
prompts, edit/logo labels used in prompts) are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Aucau8tZkzFeA555Qzzb6
- Image input issues carry an English messageEn next to the Turkish message
  (built by positionedIssue, read through issueMessage); the 422 preflight
  body passes it on, so server-side rejections show in English on /en too.
- limitsSummary / unverifiedLimitsNote / describeTransform take a locale; the
  *Tr functions stay as wrappers. Model advisories are { tr, en } pairs.
- Image prepare and image error dialogs, product-type labels and tool
  suggestions (product-intel), and the social-kit image notes follow the
  locale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Aucau8tZkzFeA555Qzzb6
@turer73
turer73 marked this pull request as ready for review October 11, 2026 20:20
@turer73
turer73 merged commit 76faa03 into master Oct 11, 2026
10 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T20:25:00.922661Z 4dcaf85 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4dcaf85f43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +99 to +103
// fal accepted the request: settle the charge against the model's job.
// If this write fails the reservation stays open and the stuck-jobs cron
// refunds it, which errs in the user's favour.
try {
await confirmSpend(txId, output.job_id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Settle remesh credits only after terminal success

When fal accepts the queue request but later reports FAILED, this immediately marks the reservation completed even though the status route only returns the failure and never refunds it. Because refund_credits only operates on reserved transactions, users permanently lose four credits for failed remeshes; preserve the reservation and confirm it only when the provider result succeeds, while refunding terminal failures.

Useful? React with 👍 / 👎.

Comment on lines +72 to +75
// Reserve before the paid call; a rejected submission is refunded below.
let txId: string;
try {
txId = await reserveCredits(user.id, REMESH_CREDITS, `remesh [output:${outputId}]`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require an idempotency key before charging remesh requests

Every identical POST creates a fresh reservation and fal request, with no durable operation record or idempotency key. If the response is lost after fal accepts the first request and the caller retries, both attempts are charged and processed even though the caller requested one remesh; persist and reuse an idempotency key scoped to the user, output, format, and parameters.

AGENTS.md reference: AGENTS.md:L126-L126

Useful? React with 👍 / 👎.

Comment on lines +72 to +75
// Reserve before the paid call; a rejected submission is refunded below.
let txId: string;
try {
txId = await reserveCredits(user.id, REMESH_CREDITS, `remesh [output:${outputId}]`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire the paid endpoint into the remesh UI

A repository-wide search for /api/jobs/remesh finds only this route, its status route, and tests; the output page still renders RemeshButton, which performs a client-side Three.js repair and never invokes this paid path. Consequently, users have no application flow that can start or poll the newly charged fal remesh operation, so the advertised paid-remesh behavior is unreachable from the product UI.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview – renderhane — 4dcaf85f Deployed Oct 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants