Skip to content
wiki.fftac.org

Workspace - Source Excerpt 05

Back to Workspace

Summary

This source excerpt preserves a bounded section of Spiralist/wp-content/plugins/spiralist-workspace/templates/workspace.php so readers can inspect the evidence without opening the full source file.

**Source path:** Spiralist/wp-content/plugins/spiralist-workspace/templates/workspace.php

</div>
                            <div class="spiralist-stat">
                                <strong><?php echo esc_html((string) count($shared_with_me)); ?></strong>
                                <span>Shared with me</span>
                            </div>
                            <div class="spiralist-stat">
                                <strong><?php echo esc_html((string) count($conversations)); ?></strong>
                                <span>Conversations</span>
                            </div>
                            <div class="spiralist-stat">
                                <strong><?php echo esc_html((string) count($runs)); ?></strong>
                                <span>Recent runs</span>
                            </div>
                        </div>
                        <?php if (!empty($participant_state)) : ?>
                            <div class="spiralist-workspace-stack">
                                <h3 class="spiralist-card-title">Participation state</h3>
                                <dl class="spiralist-meta-list spiralist-meta-list--compact">
                                    <div>
                                        <dt>Trust Level</dt>
                                        <dd><?php echo esc_html((string) ($participant_state['trust_level_label'] ?? 'New Participant')); ?></dd>
                                    </div>
                                    <div>
                                        <dt>Accepted Contributions</dt>
                                        <dd><?php echo esc_html((string) ((int) ($participant_state['accepted_contribution_count'] ?? 0))); ?></dd>
                                    </div>
                                    <div>
                                        <dt>Accepted Reviews</dt>
                                        <dd><?php echo esc_html((string) ((int) ($participant_state['accepted_review_count'] ?? 0))); ?></dd>
                                    </div>
                                    <div>
                                        <dt>Review Accuracy</dt>
                                        <dd><?php echo esc_html((string) ((float) ($participant_state['review_accuracy'] ?? 0))); ?></dd>
                                    </div>
                                </dl>
                                <?php if (!empty($participant_state['publication_cooldown_active'])) : ?>
                                    <p class="spiralist-muted">Public publication cooldown is active until <?php echo esc_html((string) ($participant_state['publication_cooldown_until'] ?? '')); ?>.</p>
                                <?php elseif ($can_resolve_prompt_appeals) : ?>
                                    <p class="spiralist-muted">You can help resolve disputes now. Steward-ready participants and curator roles can keep appeals moving even when the site owner is away.</p>
                                <?php elseif ($can_review_prompts) : ?>
                                    <p class="spiralist-muted">You can participate in peer moderation now, either through role authority or earned review eligibility.</p>
                                <?php elseif (!empty($participant_state['review_eligibility'])) : ?>
                                    <p class="spiralist-muted">You have earned reviewer-ready trust. The live permissions layer will let you review even without a curator role.</p>
                                <?php else : ?>
                                    <p class="spiralist-muted">Reviewer eligibility unlocks through accepted public contributions and accurate review decisions.</p>
                                <?php endif; ?>
                            </div>
                        <?php endif; ?>
                        <div class="spiralist-workspace-stack">
                            <h3 class="spiralist-card-title">Spiralist refinement levels</h3>
                            <ul class="spiralist-checklist">
                                <li>Level 1: Raw Prompt.</li>
                                <li>Level 2: Structured Prompt.</li>
                                <li>Level 3: Prompt System.</li>
                                <li>Level 4: Self-improving System.</li>
                            </ul>
                        </div>
                    </article>
                </div>

                <?php if ($can_review_prompts) : ?>
                    <div class="spiralist-grid spiralist-grid--split" style="margin-top:1.5rem;">
                        <article class="spiralist-panel">
                            <p class="spiralist-section-tag">Peer Moderation</p>
                            <h2 class="spiralist-section-title">Review queue</h2>
                            <p class="spiralist-muted">Public community prompts can move forward or get restricted without a single-admin approval gate. This queue is where reviewers keep the library self-operating.</p>
                            <div class="spiralist-stat-grid">
                                <div class="spiralist-stat">
                                    <strong><?php echo esc_html((string) ((int) ($review_queue_counts['total'] ?? 0))); ?></strong>
                                    <span>Total queued</span>
                                </div>
                                <div class="spiralist-stat">
                                    <strong><?php echo esc_html((string) ((int) ($review_queue_counts['stale'] ?? 0))); ?></strong>
                                    <span>Stale</span>
                                </div>
                                <div class="spiralist-stat">
                                    <strong><?php echo esc_html((string) ((int) ($review_queue_counts['urgent'] ?? 0))); ?></strong>
                                    <span>Urgent</span>
                                </div>
                                <div class="spiralist-stat">
                                    <strong><?php echo esc_html((string) ((int) ($review_queue_counts['provisional_public'] ?? 0))); ?></strong>
                                    <span>Provisional public</span>
                                </div>
                                <div class="spiralist-stat">
                                    <strong><?php echo esc_html((string) ((int) ($review_queue_counts['restricted_review'] ?? 0))); ?></strong>
                                    <span>Restricted review</span>
                                </div>
                                <div class="spiralist-stat">
                                    <strong><?php echo esc_html((string) ((int) ($review_queue_counts['reverted'] ?? 0))); ?></strong>
                                    <span>Reverted</span>
                                </div>
                            </div>
                        </article>

                        <article class="spiralist-panel">
                            <p class="spiralist-section-tag">Needs Action</p>
                            <h2 class="spiralist-section-title">Prompts awaiting peer judgment</h2>
                            <?php if (!empty($review_queue)) : ?>
                                <div class="spiralist-simple-list">
                                    <?php foreach ($review_queue as $record) : ?>
                                    <?php
                                    $summary = (array) ($record['review_summary'] ?? []);
                                    $peer = (array) ($summary['peer'] ?? []);
                                    $viewer_review = (array) ($record['viewer_review'] ?? []);
                                    $governance = (array) ($record['governance_summary'] ?? []);
                                    $queue_age = (array) ($governance['queue_age'] ?? []);
                                    ?>
                                    <div class="spiralist-simple-list__item">
                                        <strong><?php echo esc_html((string) ($record['title'] ?? 'Prompt')); ?></strong>
                                            <span class="spiralist-simple-list__meta">
                                                <?php echo esc_html((string) ($record['moderation_status_label'] ?? 'Draft')); ?> /
                                                <?php echo esc_html((string) ($record['updated_utc'] ?? '')); ?>
                                            </span>
                                            <p class="spiralist-muted">
                                                <?php echo esc_html((string) ((int) ($peer['endorse'] ?? 0))); ?> endorse /
                                                <?php echo esc_html((string) ((int) ($peer['restrict'] ?? 0))); ?> restrict /