| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <pstm-uri>/projects/{project_id}</pstm-uri>
- <pstm-template>main</pstm-template>
- </head>
- <body>
- <section>
- <h2 stm-if="project != null && project.exists" stm-text="project.name">Project</h2>
- <p stm-if="project != null && !project.exists" class="muted">Project not found.</p>
- <div stm-if="project != null && project.exists">
- <p><a href="/projects">All projects</a></p>
- <div class="cards">
- <section class="card">
- <h3>Details</h3>
- <p><strong stm-text="project.git_url">git_url</strong> · branch
- <em stm-text="project.default_branch">main</em></p>
- <p class="muted" stm-if="project.summary.length > 0" stm-text="project.summary">summary</p>
- <p class="muted">Created <span stm-text="project.created_display">when</span></p>
- </section>
- <section class="card">
- <h3>Edit</h3>
- <form stm-action="project.update">
- <input type="hidden" name="project_id" stm-attribute.value="project.id">
- <div class="form-row"><label>Name</label>
- <input type="text" name="name" stm-attribute.value="project.name"></div>
- <div class="form-row"><label>Git URL</label>
- <input type="text" name="git_url" stm-attribute.value="project.git_url"></div>
- <div class="form-row"><label>Branch</label>
- <input type="text" name="default_branch" stm-attribute.value="project.default_branch"></div>
- <div class="form-row"><label>Summary</label>
- <input type="text" name="summary" stm-attribute.value="project.summary"></div>
- <button type="submit">Save</button>
- </form>
- </section>
- </div>
- <h3>Linked projects</h3>
- <table>
- <thead><tr><th>Project</th><th>Git URL</th><th>Relationship</th><th></th></tr></thead>
- <tbody>
- <tr stm-for-link-in="project.links">
- <td><a stm-attribute.href="'/projects/' + link.project_id" stm-text="link.name">name</a></td>
- <td stm-text="link.git_url">git_url</td>
- <td><span stm-attribute.class="'badge badge-' + link.relationship" stm-text="link.relationship">relationship</span></td>
- <td><button type="button" stm-action="link.remove" stm-confirm="Remove this link?">Remove</button></td>
- </tr>
- <tr stm-if="project.links.length == 0"><td colspan="4" class="muted">No linked projects.</td></tr>
- </tbody>
- </table>
- <form class="inline" stm-action="project.add_link">
- <label for="link-target">Link project</label>
- <select id="link-target" name="linked_project_id" required>
- <option stm-for-option-in="project.linkable" stm-attribute.value="option.id" stm-text="option.name">project</option>
- </select>
- <select name="relationship">
- <option value="co-developed">co-developed</option>
- <option value="reference">reference</option>
- </select>
- <button type="submit">Add link</button>
- </form>
- <form class="inline" stm-action="project.apply_stack" stm-if="project.stack_options.length > 0">
- <label for="stack-target">Apply stack</label>
- <select id="stack-target" name="stack_id" required>
- <option stm-for-stack-in="project.stack_options" stm-attribute.value="stack.id"
- stm-text="stack.name + ' (' + stack.member_count + ')'">stack</option>
- </select>
- <button type="submit">Apply</button>
- </form>
- <p class="muted" stm-if="project.stack_options.length == 0">Manage reference
- collections on the <a href="/stacks">stacks page</a> and apply them here.</p>
- <h3>Rules</h3>
- <p class="muted">Attached rules ride along with every task dispatched for this project.</p>
- <div stm-for-rule-in="project.rules" stm-key="rule.link_id" class="card">
- <h3 stm-text="rule.name">name</h3>
- <div class="md" stm-markdown="rule.body">body</div>
- <form class="inline">
- <button type="button" stm-action="rule.detach" stm-confirm="Detach this rule?">Detach</button>
- </form>
- </div>
- <p stm-if="project.rules.length == 0" class="muted">No rules attached.</p>
- <form class="inline" stm-action="project.attach_rule" stm-if="project.rule_options.length > 0">
- <label for="rule-target">Attach rule</label>
- <select id="rule-target" name="rule_id" required>
- <option stm-for-option-in="project.rule_options" stm-attribute.value="option.id"
- stm-text="option.name">rule</option>
- </select>
- <button type="submit">Attach</button>
- </form>
- <p class="muted" stm-if="project.rule_options.length == 0">Create rules on the <a href="/rules">rules page</a>.</p>
- <h3>Understanding</h3>
- <p class="muted">A markdown map of the project's structure and anything
- unusual, written by an agent against a commit and refreshed on demand.</p>
- <div class="card" stm-if="project.understanding_current.body.length > 0">
- <p class="muted"><span stm-if="project.understanding_current.has_commit">commit
- <code stm-text="project.understanding_current.commit_hash">hash</code> · </span>refreshed
- <span stm-text="project.understanding_current.created_display">when</span><span
- stm-if="project.understanding_current.source_task_id > 0"> · from task
- <a stm-attribute.href="'/tasks/' + project.understanding_current.source_task_id"
- stm-text="'#' + project.understanding_current.source_task_id">task</a></span></p>
- <div class="md" stm-markdown="project.understanding_current.body">body</div>
- </div>
- <p class="muted" stm-if="project.understanding_current.body.length == 0">No understanding yet —
- press Refresh to have an agent explore the project.</p>
- <form class="inline" stm-action="project.refresh_understanding">
- <button type="submit" stm-confirm="Spin up an agent task to refresh the understanding?">Refresh</button>
- </form>
- <div stm-for-revision-in="project.understanding_history" stm-key="revision.id" class="card">
- <p class="muted"><span stm-if="revision.has_commit">commit
- <code stm-text="revision.commit_hash">hash</code> · </span>refreshed
- <span stm-text="revision.created_display">when</span><span
- stm-if="revision.source_task_id > 0"> · from task
- <a stm-attribute.href="'/tasks/' + revision.source_task_id"
- stm-text="'#' + revision.source_task_id">task</a></span></p>
- <div class="md" stm-markdown="revision.body">body</div>
- </div>
- <h3>Project notes</h3>
- <p class="muted">Written by agents via <code>saddle note</code>; curated here — delete what
- stops being useful. There is no manual create.</p>
- <div stm-for-note-in="project.notes" stm-key="note.id" class="card">
- <p><span class="badge" stm-text="note.project_name">project</span>
- <span class="muted" stm-text="note.created_display">when</span>
- <span class="muted" stm-if="note.source_task_id > 0"> · from task
- <a stm-attribute.href="'/tasks/' + note.source_task_id" stm-text="'#' + note.source_task_id">task</a></span></p>
- <div class="md" stm-markdown="note.body">body</div>
- <form class="inline">
- <button type="button" stm-action="note.delete" stm-confirm="Delete this note?">Delete</button>
- </form>
- </div>
- <p stm-if="project.notes.length == 0" class="muted">No notes yet — they appear as agents
- record them with <code>saddle note</code>.</p>
- <h3>Tasks in this project</h3>
- <table>
- <thead><tr><th>#</th><th>Title</th><th>Status</th><th>Priority</th></tr></thead>
- <tbody>
- <tr stm-for-task-in="project.tasks">
- <td stm-text="task.id">id</td>
- <td><a stm-attribute.href="'/tasks/' + task.id" stm-text="task.title">title</a>
- </td>
- <td><span stm-attribute.class="'badge badge-' + task.status" stm-text="task.display">status</span></td>
- <td stm-text="task.priority">priority</td>
- </tr>
- <tr stm-if="project.tasks.length == 0"><td colspan="4" class="muted">No tasks yet — create one from the <a href="/tasks">queue</a>.</td></tr>
- </tbody>
- </table>
- </div>
- </section>
- </body>
- </html>
|