{% extends "base.html" %} {#- Close a packet (docs/close-remove-plan.md): what is outstanding, then Close or Close and delete folder. Every way in to closing ends here. -#} {% import "_close.html" as cl %} {% block title %}Close {{ e.name }}{% endblock %} {% block crumbs %}/ {{ e.name }} / close{% endblock %} {% block head %}{{ cl.style() }}{% endblock %} {% block main %} {% set c = res.counts %} {% set busy = c.busy > 0 %} {% set hard = res.findings|selectattr("severity", "equalto", "busy")|rejectattr("kind", "in", stoppable)|list %} {% set kids = res.findings|selectattr("kind", "equalto", "children")|list %} {% set onlystop = busy and hard|length == 0 %} {% set onlykids = busy and kids and hard|length == 1 %} {% set loss = cl.losses(res)|trim %}

Close {{ e.name }}

board {{ board }} · {{ res.lifecycle }}
{% if res.repos|length > 1 %}{% endif %} {% if shells %}{% endif %}
Folder{{ res.folder }} · {% if split %}a split wpk made{% elif owned %}made by wpk{% else %}yours (wpk did not make it){% endif %}
Checked{{ res.checked|epoch }} Check again
Repos{% for r in res.repos %}{{ r.path }}{% if r.branch %} ({{ r.branch }}){% endif %}{{ ", " if not loop.last }}{% endfor %}
Board shells{{ shells|length }} open: Stop everything and close ends them
{% for s in sev %}{{ cl.findings(res, s, e) }}{% endfor %} {% if not c.busy and not c.unsaved %}

Nothing outstanding: it is safe to close{% if owned %} and to delete its folder{% endif %}.

{% endif %} {% if can %}
{% if res.lifecycle == "open" %}
It is still open. Close it as
{% endif %}
{% if onlykids %}
each is checked the same way; one that is busy stops it
{% endif %}
off the board, into history; the folder stays
{% if busy %}
{% if onlystop %}cancels queued work, ends stranded VS Code servers{{ " and board shells" if shells }}{% else %}what is busy needs you: answer, finish or leave it first{% endif %}
{% endif %} {% if owned %}
the folder goes; commits on no remote are kept in history as a bundle
{% if loss %}
{% endif %} {% else %}

wpk did not make this folder, so it will not delete it. Close it, then delete {{ res.folder }} yourself if you want it gone.

{% endif %}
{% else %}

Only the board's owner can close it.

{% endif %} {% endblock %}