> ## Documentation Index
> Fetch the complete documentation index at: https://heyaven09.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reviewing Work Sessions in the Aven Dashboard | Aven

> Understand the work session lifecycle, review and approve session reports as a client, and request payment as a worker — enforced atomically on Stellar.

Work sessions submitted by workers appear in the stream detail view. As a client, you review and approve (or dispute) each session before payment is released. Every approval is an on-chain action: the payment transfer and attestation mint happen in a single atomic transaction, so the worker's proof of work is cryptographically tied to the funds they receive.

## Session Lifecycle

```mermaid theme={null}
flowchart LR
    A[Worker submits session] --> B[Pending review]
    B --> C{Client action}
    C -->|Approve| D[Atomic payout + attestation]
    C -->|Dispute| E[Dispute period]
    E --> F{Resolution}
    F -->|Client approves| D
    F -->|Review deadline expires| G[Auto-release to worker]
```

Sessions move through clearly defined states. A session sits in **Pending** until you act on it. Approving it triggers an on-chain transaction; disputing it opens a review window where both parties can submit additional context.

## Reviewing a Session (for Clients)

<Steps>
  <Step title="Open the stream detail page">
    From the dashboard, click the stream you want to review. The detail page shows all submitted work sessions under the **Work Sessions** section.
  </Step>

  <Step title="Find the session under WORK SESSIONS">
    Sessions are listed in reverse chronological order. Each card shows the submission date, duration, files changed, and requested payment amount at a glance.
  </Step>

  <Step title="Click to expand the full session report">
    Select **View details** on any session card to expand the full report, which includes:

    * **Session timing** — start time, end time, and active seconds tracked
    * **Git statistics** — files changed, lines added, lines deleted, and commits made
    * **Changed file list** — relative paths, change type (added/modified/deleted), and per-file diff stats
    * **Worker statement** — the worker's own description of what was accomplished
    * **Requested payment amount** — calculated as `active_seconds × rate_per_second`, capped by available stream balance
    * **Verification summary** — the dashboard's automated validation result and any verification flags
  </Step>

  <Step title="Click Approve to release payment atomically">
    When you are satisfied with the session, click **Approve**. Freighter prompts you to sign the transaction. Once confirmed:

    * Funds are transferred to the worker's account
    * An attestation record is minted on-chain simultaneously
    * Both steps are atomic — if either fails, the entire transaction reverts
  </Step>

  <Step title="Or click Dispute to raise a concern">
    If you believe the session does not represent the agreed work, click **Dispute**. A text area appears where you must provide a written reason (minimum 20 characters). This opens a dispute period during which both parties can submit additional context.
  </Step>
</Steps>

## Session Report Contents

| Field                    | Description                                                                    |
| ------------------------ | ------------------------------------------------------------------------------ |
| **Session ID**           | Unique identifier for the work period                                          |
| **Active seconds**       | Time the worker was actively working (used to calculate payment)               |
| **Idle seconds**         | Tracked idle time — this is not billed                                         |
| **Git branch**           | The branch the worker was on during the session                                |
| **Commits**              | Commits made during the session                                                |
| **Changed files**        | Relative paths, change types (added/modified/deleted), and per-file diff stats |
| **Worker statement**     | The worker's own description of the work done                                  |
| **Requested amount**     | Calculated as `active_seconds × rate_per_second`, capped by available balance  |
| **Verification summary** | Automated integrity check result from the Aven dashboard verifier              |
| **Report digest**        | A short on-chain fingerprint of the submitted report                           |

<Note>
  The CLI never uploads file contents — only metadata. Changed file paths, additions, and deletions are included; actual source code is not. Files matching `.gitignore` or `.avenignore` patterns are excluded entirely.
</Note>

## For Workers: Requesting Payment

<Steps>
  <Step title="Stop your work session with the CLI">
    Run the following command in your repository when your work period ends:

    ```bash theme={null}
    npx aven-stellar stop --message "Summary of work completed"
    ```

    The CLI calculates your active seconds and git statistics, shows you a preview of the report, and asks for confirmation before submitting.
  </Step>

  <Step title="Session appears as Pending in the dashboard">
    After submission, the session appears under **Work Sessions** on your stream's detail page with a status of **Pending review**. Both you and the client can see it immediately.
  </Step>

  <Step title="Share the stream URL with the client for review">
    Send the client the link to the stream detail page. They can find the stream by navigating to the Aven dashboard and selecting the stream by its ID. They will see the session queued for review.
  </Step>

  <Step title="Request withdrawal once verification is complete">
    After the dashboard verifier processes the report, your session status updates to **Verification complete**. Click **Request withdrawal** to move it into the client's review queue.
  </Step>

  <Step title="Withdraw once the client approves">
    When the client approves your session, the status becomes **Release eligible**. Click **Withdraw** in the dashboard to trigger the on-chain payout. Freighter prompts for one final signature to complete the transfer.
  </Step>
</Steps>

## Dispute Resolution

Disputes allow either party to flag a session before payment is released.

* The **client** can raise a dispute from the session card while it is in **Pending client review** status.
* Both sides can submit written context after a dispute is opened.
* If the client does not respond before the **review deadline** shown on the session card, the session auto-releases to the worker once the deadline expires.
* Once both parties reach agreement, the client approves the session and the payout proceeds normally.

<Note>
  Approved sessions trigger an atomic on-chain transaction — the payment transfer and attestation minting happen simultaneously. There is no way to approve payment without creating an attestation, or create an attestation without payment.
</Note>
