{% extends "base.html" %} {% block content %}

{{ project.name }}

{% if not locked %} {% endif %}
{{ bible.project_metadata.genre }} {{ bible.project_metadata.target_audience }}
{% if runs and runs[0].status in ['running', 'queued'] %}
{% endif %}
Workflow: 1. Review the World Bible below.    2. Click Generate New Book.    3. When finished, Download the files or click Read & Edit to refine the text.

Active Run (ID: {{ active_run.id if active_run else '-' }})

{% if active_run %}
{{ active_run.status|upper }} Run #{{ active_run.id }} started at {{ active_run.start_time.strftime('%Y-%m-%d %H:%M') }} Cost: ${{ "%.4f"|format(active_run.cost) }}
{% if artifacts or cover_image %}
{% if cover_image %}
Book Cover
{% endif %}
{{ 'Book Generated!' if active_run.status == 'completed' else 'Files Available' }}

{{ 'Your manuscript and ebook files are ready.' if active_run.status == 'completed' else 'Files generated during this run (may be partial).' }}


{% for file in artifacts %} Download {{ file.type }} {% endfor %}
{% if blurb_content %}
Back Cover Blurb

{{ blurb_content }}

{% endif %}
{% endif %} {% if active_run and active_run.status in ['running', 'queued'] %}
Initializing...
Preparing environment...
{% endif %}
Loading logs...
{% else %}

No books generated yet.

Click the Generate New Book button to start writing.

{% endif %}
Run History
{% for r in runs %} {% else %} {% endfor %}
ID Date Status Cost Action
#{{ r.id }} {{ r.start_time.strftime('%Y-%m-%d %H:%M') }} {{ r.status }} ${{ "%.4f"|format(r.cost) }} {{ 'View Active' if active_run and r.id == active_run.id else 'View' }} {% if r.status in ['failed', 'cancelled', 'interrupted'] %}
{% endif %} {% if r.status not in ['running', 'queued'] %}
{% endif %}
No runs found.

{{ 'Series Overview' if bible.project_metadata.is_series else 'Book Overview' }}

{% for book in bible.books %}
Book {{ book.book_number }} {% if generated_books.get(book.book_number) %}
{% else %} Planned {% endif %}
{{ book.title }}

{{ book.manual_instruction or "No summary provided." }}

{% if not locked %} {% if not generated_books.get(book.book_number) %}
{% endif %} {% endif %}
{% endfor %} {% if not locked %}

Add Next Book
{% endif %}
World Bible & Characters
{% if is_refining %} Refining... {% endif %} Full Review {% if not locked %} {% if has_draft %} Review Draft {% elif is_refining %} {% else %} {% endif %} {% endif %}
{% if has_draft %}
Draft Pending: You have an unreviewed Bible refinement waiting.
Review Changes
{% endif %}
Project Metadata
Author
{{ bible.project_metadata.author }}
Genre
{{ bible.project_metadata.genre }}
Tone
{{ bible.project_metadata.style.tone }}
Series
{{ 'Yes' if bible.project_metadata.is_series else 'No' }}
Characters ({{ bible.characters|length }})
{% for c in bible.characters %} {{ c.name }} | {{ c.role }} {% else %} No characters defined. {% endfor %}
{% endblock %} {% block scripts %} {% endblock %}