# Bottom panel

The bottom panel sits below the document area, between the Explorer and the Inspector.
It holds tool views that need width rather than height - search results across many files
and, step by step, more views (output, problems, alerts, jobs, a terminal).

| Action | How |
|---|---|
| Show / hide | **View > Bottom Panel** or **Ctrl+J**, or the **x** button in the panel's header |
| Resize | Drag the line between the document area and the panel; the height is remembered |
| Maximize / restore | **View > Maximize Bottom Panel** or the chevron button in the panel's header - the panel takes the whole central column; the side panels stay as they are |
| Collapse / expand | **View > Collapse Bottom Panel** or the button left of the chevron (a dash) - the panel folds to its row of tabs and the log gets the space; click a tab (or the button again) to unfold it. Views that refresh by themselves (System) pause while folded; work you started (a search, a terminal) keeps running |
| Switch views | Click a tab in the panel's header, or **View > Tool Views**. Tabs that do not fit the panel's width go behind the **...** button after the last tab - a menu of them; from the keyboard, **View > Tool Views** lists every view; the active view's tab always stays visible |
| Move the focus | **F6** / **Shift+F6** cycle through Explorer, documents, bottom panel and Inspector |

Hiding the panel only hides it: whatever runs in it (a search, later a terminal) keeps
running, and the panel shows the current state when it comes back. The panel's visibility,
height and last view are remembered; it always reopens at its normal size.

## Views

| View | Status |
|---|---|
| **Record** | The complete record at the caret - one line, or a multiline entry with its stack trace or payload; also lines wider than the screen (below) |
| **Search Results** | The results of every search - kept as search sessions (below) |
| **Advanced Search** | Investigations: a query over several sources and a time range (below) |
| **Output** | What TKTail itself is doing - file monitoring events, searches, errors (below) |
| **Problems** | What needs your attention now - files that cannot be opened or are missing, invalid alert rules (below) |
| **Alerts** | The alert history - every match of your alert rules, newest first (below) |
| **Incidents** | What your alerts kept when they fired - the trigger and the evidence around it (below) |
| **Evidence** | The evidence packages you (or an AI assistant) saved - [Saving evidence](https://tktail.dev/help/saving-evidence/) |
| **Jobs** | Work running in the background - searches, exports, line indexing (below) |
| **Terminal** | A command prompt next to your logs - PowerShell or cmd (below) |
| **System** | How busy the PC is and what TKTail itself uses (below) |
| **Metrics** | Every Windows Performance Counter being collected, and the panel's own always-on list - see [Metrics](https://tktail.dev/help/metrics/#the-metrics-panel) |
| Processes, Services, File Activity | *(planned)* |

## Record

Shows the **record** the caret is in - the logical log entry, in full. One source line is often
one record, but not always: an application log's ERROR with its stack trace, a JSON payload
over several lines or a block of a Qlik trace are one record of several **source lines** (and
a long line wrapped on screen is still one line). The view used to be called LINE; it shows
what the entry means, so it is called RECORD. It is also the place for a line much wider than
the screen: a one-line JSON document, a FIX message, a record with hundreds of fields.

*Screenshot: A 29,649-character line: the caret far to the right in the file view and in the RECORD view*

Open it with **View > Tool Views > Record** (or right-click the Bottom Panel button on the
toolbar); it follows the caret of the file you are working in, and of the pane you are in
when the file is split. **Alt+Down** / **Alt+Up** (View > Next / Previous Record) move the caret
to the next / previous record - past a whole stack trace at once ([Records and
time](https://tktail.dev/help/viewing-logs/#records-and-time)).

- The header tells you which line it is, how many characters and bytes it has and where it
  is in the file. Lines longer than 1 MB are shown as a part of at most 1 MB around the caret -
  the header says so - and that part moves along when the caret leaves it.
- For a record of several lines the header says which **source lines** it spans and which one
  the caret is on: *Record: lines 2–5 (caret on 4)*. The last record of the file adds *at the end: may still
  grow* - if the file grows, more lines may still join it until the next record starts. A
  record longer than 2,000 lines / 4 MB is shown in parts: *a part of a longer record (record
  size limit)*.

*Screenshot: The caret on a stack frame: the RECORD view shows the whole ERROR record (lines 5,308-5,313) with its exception and frames*

- **Format** (first in the header) shows how TKTail reads the file: `Auto (FIX)` when the
  configuration or detection decided, the name alone when you chose it with View As for this
  session; the tooltip says why (and which `.tktail` decided). A click opens the View As menu:
  a format for this session, Auto, or the Set Format for This File / Folder... items that write a
  [folder format](https://tktail.dev/help/local-configuration/). An event tab shows `Format: Windows Event Log` (not a
  choice). From the keyboard: **Tab** in the RECORD view (the text, the summary or the Fields list)
  moves to the header buttons, **Left** / **Right** between them, **Enter**, **Space** or **Down**
  opens one, **Esc** goes back to where you were.

*Screenshot: The Format button reads "Format: Auto (FIX)"; its menu is View As: Auto checked, the format categories, Set Format for This File / Folder, Explain Format Resolution*
- **Layout** (in the header) chooses what you see; your choice is remembered:
  - **Source** - exactly the characters in the file, shown as the viewer shows them: FIX's
    SOH field separators as `|` (one character for one, so positions and marked fields stay
    exact), other control characters as symbols. **Copy Source** copies the real characters,
    SOH included; **Copy Displayed Text** copies the `|` form. For formats whose records span several lines (application
    logs with stack traces, the MySQL slow log, HL7) Source is the whole record, with the
    caret's line marked.
  - **Record** - the record in the representation **View** picks (below).
  - **Split** - Source and Record side by side. Drag the bar between them to change the
    widths (double-click it for half and half); the widths are remembered. Picking a field or
    a summary value on the right marks its exact characters on the left and scrolls to them;
    moving the caret in Source selects the field it is in.
- **View** (next to Layout, when the record is shown) chooses how the record is presented.
  Only what makes sense for the file's format is offered, and your choice is remembered per
  format:
  - **Text**: the readable form (FIX separators as `|`, as in Source). It is a presentation, not
    the source.
  - **Fields**: one row per field, in the order of the record. FIX shows **Tag, Field, Value,
    Meaning** - for example `39  OrdStatus  8  Rejected`: the original value stays, the meaning
    is added. JSON shows **Path, Type, Value**; CSV and IIS show the file's own columns; syslog,
    logfmt, CEF and the other log formats show their fields.
  - **Summary**: what the record means, in a few lines - for IIS `GET /api/orders?id=123`,
    a `500 Internal Server Error` badge, duration, client, server; for FIX
    `ExecutionReport - Rejected` with symbol, side, quantity, price and the session; for syslog
    severity, program, host and the message; for PostgreSQL the severity, SQLSTATE (with its
    name, e.g. `23505 unique_violation`), message, database and query; also Apache / nginx,
    the MySQL slow log and JSON / logfmt / CEF records that carry a level and a message.
    Original values stay visible next to their meaning (`843 ms (843)`, `Side 1 Buy`); fields
    that a file does not contain are left out. The record's **message** has its own block at the end
    of the Summary, after the other values (MESSAGE): wrapped, selectable (drag, Ctrl+C), a few lines at first - a long one
    says how long it is and offers **Show Full Message**; **Show in Source** marks exactly the
    message's characters, **Copy Message** copies all of it (never just what is on screen). If a
    record of a format with messages has none, the Summary says so. Fields always lists every
    field, whatever the Summary shows. Click a value to put the caret on its exact
    bytes; right-click for copy, find and alert actions (they use the real field and value,
    e.g. `sc-status = 500`). Records without a reliable interpretation get no summary - use
    Fields.
  - **Tree**: JSON fields indented by nesting. **Pretty**: a formatted copy of one JSON record.
  - **Auto** picks the most useful one for the record at the caret: Summary for IIS, FIX,
    syslog, PostgreSQL, Apache / nginx, the MySQL slow log and application logs, Fields for CSV
    and other logs, Tree for JSON lines - and when a record has fields but no reliable summary,
    Fields; Text only when the record has no fields at all. The RECORD view shows the same record
    and position as the status bar and the Inspector.
*Screenshot: Summary of an IIS request: status badge, request, duration, client and server*

*Screenshot: Summary of a FIX execution report: Rejected, with the order and execution details*

*Screenshot: The same FIX message as fields: Tag, Field, Value and Meaning in protocol order*

- In **Fields**, selecting a field puts the file view's caret on that field's exact bytes and
  marks them (green); moving the caret in the file selects the field it is in. **Find field...**
  filters the rows. Right-click a field to copy its value, name, tag, meaning or `tag=value`,
  to find the same value / field / field = value (here or in the folder), to create an alert
  from it, or to show it in the source. **Copy** in the header copies the source, the readable
  text, the pretty form or the fields (as TSV or JSON) - always the one you choose.
- A record that cannot be parsed completely still shows what could be read, with a short note
  in the header ("Parsed partially: ..."); FIX messages with SOH separators are checked:
  "Check: CheckSum 000 declared, 124 computed". Source and Text always work.
- In Source and Text the line is drawn exactly as in the file view, wrapped to the panel's
  width (at spaces and punctuation where possible) so you can read it whole - **Wrap** (the
  first button in the panel header) switches to one row you scroll sideways, for an exact
  one-line layout. **Colorize** (the second button) paints Source and Text with the same
  syntax colours as the file view (JSON keys and values, log levels and timestamps, FIX tags,
  XML tags ...); it only changes how the text looks - copying and exporting are unaffected.
  Texts longer than 64 thousand characters are shown without colours, as in the file view. Wrapped rows are still one line: the line number stays the same and
  copying copies the line, not the rows. The header shows the line, the column of the caret
  in that line, the size and the format.
- Select text in the view with the mouse (drag, Shift+click, double-click for a word); in
  Source and Text it is the same selection as in the file view - the same bytes - so **Ctrl+C**
  copies exactly what is in the file. **Ctrl+A** selects this line or record (not the whole
  file). Right-click: **Copy**, **Select All**, **Show in Viewer**. In **Pretty** you select and
  copy the formatted text. The caret's position and the current search match
  are marked; click into the text to put the file view's caret there; **Show in viewer** (the
  eye button) scrolls the file view to the caret.
- **Inspect Record** (right-click in the file view) opens this view in Auto.
- Records longer than 1 MB are shown in Source and Text only. The view does no work while it is
  hidden.

## Search Results

The results of every search - **Find in All Open Files**, the toolbar's search box, **Advanced
Search** and folder searches. Each search is kept as its own **search session**: a new search does
not throw away the previous one.

*Screenshot: Search Results of a search session*

| Start a search | Searches |
|---|---|
| The **search box on the right of the toolbar** (Ctrl+Shift+F puts the cursor there) | depending on its scope: every open source (files and event logs), the Explorer's folder (contents) or the file names there; Enter starts it - with the find bar's options (regular expression, match case) |
| **Edit > Find in All Open Files** (Ctrl+Shift+F) | the same box, the selection (one line) or the find bar's text filled in; without the toolbar the find bar's complete query runs at once |
| **Advanced Search** (Ctrl+Alt+F) | a query, a scope and a time range - see below |
| Explorer: **Search Files...** / **Search Contents...**; `tktail folder C:\Logs --search-content "timeout"` | the folder's file names / the text inside its files (Advanced Search with that folder as the scope) |

The top row shows the sessions (newest first - `#17  timeout - all open sources  (184)`, a
refinement as `#18  within #17 - ERROR  (12)`, a search an AI assistant ran for you as
`#19  AI · requestId = ABC123 - open sources  (7)` - see [AI integration](https://tktail.dev/help/mcp/)) and, next to them, **the shown search exactly as it
ran**: its text, regular expression or field condition, match case, scope and time range. Changing
an option somewhere else never changes what a session means. The second row says how it went:

| State | Means |
|---|---|
| **Searching** | still running - results appear as they are found; **Esc** or the header's Cancel stops it |
| **Completed** | everything it was asked to search was searched |
| **Incomplete** | the results are right but not everything could be searched: a line too complex for the regular expression was skipped, a source closed or changed its format during the search - the reason is named; the count is what was found, never a total |
| **Cancelled** | you stopped it (or closed TKTail) - what it had found stays |
| **Failed** | it could not continue - for example a regular expression too expensive for the data; what it had found stays, marked incomplete |
| **Not run** | listed from the last run (only the queries are kept); **Run Again** runs it |

Results appear while the search runs: **Source**, **Line** (for open files), **Time** (the time of
the record the match is in, as its format gives it - local time; a time of day stays a time of
day), **Match** (the line around the match) and **Path**. Click a column header to sort.
**Double-click** or **Enter** opens the source at the match and highlights it (Ctrl+Enter: in a
split). A result whose file was rotated, truncated or replaced since the search is **stale**: it is
not opened (the status bar says so) - run the search again.

An event log's results show the log's name, the event (time, level, provider, ID, the message
around the match) and the log's address (`eventlog://local/System`) instead of a path - there is no
line number. Opening one selects the event in its tab. See
[Windows Event Log](https://tktail.dev/help/windows-event-log/#finding-events).

Select several results with Ctrl+click or Shift+click, or all of them with **Ctrl+A**; **Ctrl+C**
copies them one per line as `path:line: match line`. Right-click a result for:
- **Copy Match** - exactly the text that matched, and **Copy Line** - the whole line it is on,
  both read from the file now (not the shortened text in the list). If the file changed since
  the search, the status bar says so.
- **Copy Preview** (the text shown in the list), **Copy Full Path**, **Copy Path and Line**
  (`C:\Logs\app.log:402191`, for open files where the line number is known), **Copy File Name**.
- **Export...** (also the header button) saves all results - or the selected ones - as TSV,
  CSV or JSON Lines with the columns Source, Line, Time, Match, Path and Offset (and Record, the
  event's record ID, when there are event results).
- **Reveal in Explorer** and **Open Containing Folder**.

The header's buttons work on the shown session:

- **Run Again** runs exactly its request again as a new session (the old one stays in the list).
  A search of the last 15 minutes / hour / 24 hours searches the last hour again - from now.
- **Edit Search** opens it in the Advanced Search **builder** (below), to change it and run it as
  a new session - the original stays as it is.
- **Search Within These Results** opens **Advanced Search** with this session as the scope: the
  new search checks only these results - the session it makes is a refinement (`#18 within #17`)
  and the original stays as it is. **Back to the Parent Search** goes the other way. A folder
  search can be refined too (its files are read again, still without opening them; a file replaced
  since is stale). Only the results a search keeps are checked: if it found more than it keeps
  (5,000), the refinement is *Incomplete* and says how many it checked - narrow the first search
  to refine every match.

*Screenshot: Search Within: worker-3 among the ERROR records of #1*

- **Close this search** (also the x next to the selector).
- **More actions** (the arrow at the end of the header) holds the rest: **Save Search...**,
  **Save Effective Search...**, **Save Results...**, **Open Saved Results...** and **Close All
  Searches** - below. When the panel is narrow, buttons that do not fit move into this menu too.

Up to 10 searches are kept (setting `search.sessions`); beyond that the oldest finished one is
dropped - never one that runs or the one shown. Each keeps up to 5,000 results; the count goes on
beyond them (*showing the first 5,000*). After a restart the queries are listed again, marked
*Not run* - results are not kept unless you save them (below). A refinement is not kept across
restarts.

### Save the question, save the answer

| | What it keeps | Where |
|---|---|---|
| **Saved Search** | the criteria - sources, conditions, time - to run again any time | Advanced Search's **Preset** list |
| **Search session** | one run of criteria and what it found | Search Results (until closed) |
| **Saved Results** | what one run found, as it was (complete or not) | a `.tktresults` file you choose |
| **Pinned search** | a session that is never closed to make room and comes back after a restart (its results' positions) | Search Results (until unpinned) |
| **Evidence package** | the records the results point at, with their context, redacted - kept after the logs rotate | the Evidence tab ([Saving evidence](https://tktail.dev/help/saving-evidence/)) |

- **Save Search...** keeps this session's criteria as a Saved Search (it asks for a name and an
  optional description). A
  search that refines another (`#18 within #17`) has no criteria of its own to keep: use
- **Save Effective Search...** - the criteria of the whole chain combined (`#17`'s sources and
  conditions AND `#18`'s AND `#19`'s), as one Saved Search. It is offered only when running that
  one search finds exactly what the chain found. It is not when a search in the chain did not
  finish, kept fewer results than it found (*showing the first 5,000*), or tested text on the lines
  of records an earlier search found by their fields - TKTail says which, and offers to save the
  results instead.
- **Save Results...** writes what this search found to a file: its criteria, how it ended
  (*Incomplete* stays incomplete), how many it found and kept, and each result with its time and
  line - not the logs themselves. **Open Saved Results...** shows them again as a search session:
  open, export or search within them while the files are there. A file that was replaced or
  shortened since is reported when they open, and its results are *stale* - they never lead to
  other lines.
- Saved Searches and saved results may contain paths, server names and search terms; saved
  results also contain the matching lines' text. Share them with that in mind.
- **Pin Search** (the pin on the toolbar, or the results' context menu) keeps a search: TKTail never
  closes it to make room, also not for an AI assistant's searches, and it comes back after a restart.
  At most 20 searches are pinned. A pin keeps the search and where its results are - if the log
  rotates away, the results cannot be shown any more.
- **Save as Evidence** (the toolbar; **Save Selected as Evidence...** / **Save All as Evidence...** in
  the context menu) keeps the records themselves, with the context you choose, redacted, in a package
  that stays after the log is gone - [Saving evidence](https://tktail.dev/help/saving-evidence/). Pin while you
  investigate; save evidence when the proof must survive the logs.

A typical investigation: Advanced Search over the gateway and IIS logs (`level = ERROR` OR
`sc-status >= 500`) finds 1,284 matches (#42); **Search Within** for `component contains Payment`
leaves 37 (#43). **Save Effective Search...** keeps "Payment failures" for next time;
**Save Results...** keeps "Payment incident 2026-10-07" as evidence.

## Advanced Search

**Quick Search finds text; Advanced Search runs investigations.** The find bar (Ctrl+F) finds the
next match in the file you look at. **Advanced Search** (**Edit > Advanced Search**, Ctrl+Alt+F,
or its tab) searches several sources at once, within a time range, with a field condition, and
keeps every search as a session in Search Results.

*Screenshot: Advanced Search*

- **Preset** - the Saved Searches, by name. Choosing one loads it - in the simple form when it
  fits there, else in the builder (below); *Unsaved search* means the search in the panel is not one
  of them. **Save** saves the changes into the preset that is loaded (or asks for a name when none
  is); a `*` after its name means there are changes not saved yet - loading another preset or
  **Reset** then asks first (**Save**, **Discard**, **Cancel**). The arrow next to Save:
  **Save As...**, **Revert to Saved**, **Rename...**, **Duplicate...**, **Delete...**,
  **Import...** / **Export...** (`.tktsearch.json` files) and **Open Saved Searches Folder**.
  Save As, Rename and Duplicate ask for a name and an optional description, which the status line
  shows when the search is loaded. A Saved Search needs at least one condition - text, a field
  condition or a time range (a time range alone is enough); finding every record at any time runs,
  but is not saved. A file-name search is not a Saved Search.
  **Reset** empties the panel - all open sources, no condition, any time - and never changes or
  deletes a Saved Search. Nothing is saved automatically. Saved Searches are files in
  `%LOCALAPPDATA%\TKTail\Searches` (the `data` folder in portable mode); a file TKTail cannot read
  is listed by Open Saved Searches Folder and left alone.
- **Find**: the text - or nothing, to find every record in the time range. **Text** finds it
  literally, **Regular expression** uses [TKTail Regex v1](https://tktail.dev/help/search/#regular-expressions),
  **Field condition** reads the records' fields (`level = ERROR`, `sc-status >= 500`,
  `Symbol = MSFT`) - better than a regular expression over the raw text when the format has the
  field. **Aa**: match case.
- **In**: the **current source** (the file or event log you look at), **all open sources**, the
  results of the search **Search Results shows** (Search Within), or a folder's contents / file
  names (a folder and **Subfolders**). A folder's files are searched without opening them, each in
  the format TKTail would show it in (its `.tktail`, your format associations, or detection) - so a
  field condition and a time range work there too; binary files are skipped. The summary says how
  many files were searched from how many folders, and names what could not be read (a missing
  folder, a file another program holds) - the search is then *Incomplete*.
- **Time**: any time, the last 15 minutes / hour / 24 hours (counted back from when the search
  starts), today, or **Between...** a **From** and a **To** in your local time
  (`2026-10-06 10:00`, `2026-10-06`, or `10:00` for today). In the builder, a From of
  `last 2 hours` or `-30m` (and no To) is such a relative range. From is
  included, To is not: `[From, To)`. Each record is placed by its own time as its format gives it -
  an IIS line by its UTC date and time, an event by its TimeCreated, an application log by the
  time it writes. Records with only a time of day (a Qlik script trace) or no time cannot be placed
  in a dated range: they are not found, and the summary counts them.
  The first time-range search in a large file reads all of it; TKTail notes where the times lie
  (a small index per open file), so the next time-range searches in that file skip the parts
  outside the range - the same results, much faster. It starts again when the file is replaced or
  shown in another format.
- **Search** (Enter) checks the query first - a mistake in a regular expression is shown here in
  full (*Invalid regular expression at position 7: missing closing parenthesis*), already while
  you type - and then starts the search; its results appear in Search Results, which gets the
  keyboard, and it is a job in **Jobs**. **Cancel** - or Esc, here or in Search Results - stops it,
  the same as Cancel in Jobs. **Tab** / **Shift+Tab** move between the fields; Ctrl+Alt+F comes
  back here.

A regular expression that is too expensive for a line is skipped there and counted (the search is
then *Incomplete*); one that keeps hitting the limit is stopped - *This regular expression is too
expensive for the data searched* - and what it had found stays. See
[Regular expressions](https://tktail.dev/help/search/#regular-expressions).

### The builder: several sources, AND / OR

Choose where to search first, then say what must be true there. **Builder** (next to Search) turns
the form into a builder - it starts from what the form held. In the builder the same button reads
**Simple form** and always goes back: when the simple form can show the search (one source, one
text or field condition, one time range) it shows it there; when the builder is empty you get an
empty form; otherwise - several sources or conditions, a group, file masks, a format filter -
TKTail asks first: **Save and leave** (into the loaded preset, or as a new one), **Leave without
saving** (the simple form shows what it held before the builder) or **Cancel**. A preset that is
saved and unchanged leaves without asking - it stays in the presets. A preset that needs the
builder opens in it.

*Screenshot: The builder with the preset "Payment failures": two folders, and ERROR records from the first OR server errors from the second*

**Search in** - one row per source (up to 16), each named S1, S2 ...; **+ Source** adds one:

- **All open sources** - every open file and event log; **Any format** narrows them to the formats
  you tick (*IIS W3C*, *Application log*, your custom formats, *Windows Event Log* for event tabs).
  A file counts in the format it is shown in.
- **One source** - an open file or event log (pick it, or type its path).
- **Folder** - its files, without opening them: the folder, **subfolders** on or off, **Include**
  and **Exclude** file masks separated by `;` - a name (`*.log`, `u_ex*.log`; without a `*` a part of
  the name, as in the File Explorer's filter) or a path below the folder (`**\archive\**`,
  `2026\*.log`) - and the formats to keep. Each file is read in the format TKTail would show it in
  (its `.tktail`, your associations, detection); binary files are skipped. A file that is already
  open is searched as the open file. Up to 10,000 files per search - more makes it *Incomplete*:
  narrow the folders or the masks.
- **Results of a search** - the results of an earlier search session (Search Within).

**Where** - what must be true: **all of these** or **any of these**, then the conditions, numbered
1, 2, 3 ... (an error names its number: *Condition 2: type the text to find*). **+ Condition**
adds one of:

| Condition | Matches |
|---|---|
| **Text** / **Regular expression** (**Aa**: match case) | a line that contains it - tested on each line, so a stack-trace line can match on its own |
| **Field condition** (`level = ERROR`, `sc-status >= 500`, `user exists`, `user is null`; **Aa**: match case of the value) | a record whose field holds it - all lines of the record share its fields |
| **Time range** (From, To - To excluded) | a record whose own time is in the range |
| **From source** (S1, S2 ...) | what came from that source row - to give each source its own conditions |

**+ Group** adds a group inside: **All of** or **Any of** its own conditions (up to 32 conditions
and groups, 4 levels deep). Each line is one result, even when several conditions or groups match
it. **x** removes a source, a condition or a group.

Examples:

- *Errors of two folders, archives left out*: S1 Folder `D:\Logs\App` (Include `*.log`, Exclude
  `**\archive\**`), S2 Folder `D:\Logs\IIS`; Where all of: Field condition `level = ERROR`.
- *Different conditions per source* (the picture): any of - All of (From source S1, `level =
  ERROR`, Text `worker-3`) - All of (From source S2, `sc-status >= 500`).
- *IIS only*: S1 All open sources, formats IIS W3C; Where: `sc-status >= 500`.
- *Narrow a result*: **Search Within These Results** in Search Results - with the builder on, those
  results become its one source; add the conditions that narrow them.

The keyboard works throughout: **Tab** / **Shift+Tab** go through every row (the list scrolls to
the one you are on), **Enter** in a field searches, **Enter** or **Space** on a button presses it
(+ Condition, x ...). A search that cannot run says why and puts the cursor on the source or
condition to fix.

### Sequences: one thing, then another, in time

A search finds records that each satisfy the conditions. A **sequence** finds *related* records in
order: one thing, then - within a delay - another, then another; in one log, or across logs and
event logs. The signal is the relationship, not any one record: *a request starts, its IIS call
fails 10 to 30 seconds later, the payment service logs an ERROR within 10 seconds after that*.

In the builder, **Find** - *a sequence: one thing, then another, in time*. The conditions you had
become step 1, and a step 2 appears (switching back to *records* finds your conditions as they were).

- **Step 1, Step 2 ...** (2 to 8 steps): each step reads **every source** or one of the sources
  above (S1, S2 ...) and has its own conditions - text, regular expressions, field conditions, time
  ranges, groups - as in **Where** above. A step is satisfied by one record (or one event).
- Between the steps: **then, after step N: earliest** ... **latest** ... - how long after the
  previous step's item: `10 s`, `1.5 s`, `500 ms`, `2 min`, `1 h`, `1 min 30 s` (a number alone is
  seconds). Both are included: earliest `10 s`, latest `30 s` is 10 to 30 seconds later; `0 s` and
  `0 s` is at the same time. Latest is at most 1 day.
- **+ Step** adds a step at the end; the **x** of a step removes it (two stay).
- **Correlate**: *by time only* - the pattern itself is the answer (no claim that the items belong
  to one transaction) - or *by a key*: the items of a sequence must have the same value.
  - **Key 1**: the key's name (results show it), and how values compare: **exactly**, **ignoring
    case**, or **as numbers** (`007` = `7`).
  - Where the value is, in every step: a **field** (by its name: `requestId`, `cs-uri-stem`), the
    **message**, or the **line text**; taken as the **whole value**, a **regex capture** (a named
    capture: `/orders/(?<id>\d+)/` takes `12345` from `/api/orders/12345/status`), the **text
    after** a marker (`requestId=`), a **delimited part**, a **substring**, a **path segment** or a
    **query parameter**. The button at the end normalizes it first: trim, lowercase / uppercase,
    as a number, or strip a prefix (`T-`).
  - **Per step** gives each step its own field and extractor - when the same id has another name
    in each log. **+ Key part** adds a part (tenant *and* request id; up to 4).
  - An item without a value for the key never joins a sequence; the summary counts such items.

*Screenshot: The sequence builder: REQUEST_START in the gateway log, then 10 to 30 s later an IIS 5xx, then within 10 s a payment ERROR - one request id under three names*

**How sequences are chosen** - one answer, never every combination: the step-1 items are taken in
time order; each takes the earliest items of the next steps - inside their windows, not used by an
earlier sequence - that complete the sequence. An item belongs to one sequence at most and is never
two steps of one. Without a key, starts and ends pair in time order (the first start with the first
end that fits it).

**Times** - each item's own time, as its format gives it: an IIS log's UTC time, an application
log's local time, an event's TimeCreated - all on one clock (local times are read with this
computer's time zone). Lines are ordered by their times, never by their place in the file. A time of
day without a date (a Qlik script trace) or no time cannot be placed: a step whose sources only have
such times is refused (*Step 2: its sources have no dated times*); otherwise such items are counted
and left out - never given a date.

**Results**: Search Results lists the sequences - a row each with its start, how long it took, its
key (`requestId=REQ-10003`) and its sources (`gateway.log → u_ex261007.log → payment.log`) - and
their members below, numbered by step. Click the arrow (or press Enter, Left / Right) to close or
open a sequence; **More actions** has **Expand All Sequences** / **Collapse All Sequences**. A member
opens like any result: a file at its line - also a line of an exception's stack trace - or an event
in its tab. The summary counts sequences (*12 sequences of 3 steps*), never their members, and the
work done: first-step items, candidates, comparisons, and what the windows let it skip.

*Screenshot: Search Results of a sequence search: twelve sequences, each with its three members*

- **Search Within These Sequences** keeps the sequences with a member that satisfies the new
  condition - whole, with their members.
- Presets, **Save Search**, **Edit Search** and **Run Again** work as for any search; **Save
  Results** keeps the sequences with their members; **Export** writes each member with its
  sequence and step.
- **Bounds**: a step keeps up to 100,000 items; beyond that the search is *Incomplete* and says which
  step to narrow (add a time range or a field condition to it). The matching work is bounded too.
- Not available: "X, and then **no** Y within 30 s", repetitions, optional steps.

## Output

**Output** shows what TKTail itself is doing, one channel at a time: **Application**
(start, settings, errors), **File Monitoring** (a file disappeared, came back, was truncated or
replaced by rotation, background monitoring on/off), **Search** (finished searches with the
number of results and the time taken), **Alerts** (rules added, alert history problems),
**Export** and **Shell Integration**. Open it with **View > Tool Views > Output**.

*Screenshot: Output view showing the File Monitoring channel*

- Pick the channel in the box at the top left; **Debug** also shows detailed messages.
- Warnings are shown in amber, errors in red; the **File** column shows the file an entry is
  about (right-click > **Open File in TKTail**).
- **Copy** (Ctrl+C, several lines with Ctrl+A or Shift+click), **Copy Message** (only the
  text of the entry), **Export...** (all or the selected entries as TSV, CSV or JSON Lines),
  **Clear View** (hides what is
  shown so far; nothing is deleted), **Open Log File** (opens TKTail's own log in a new tab)
  and **Open Log Folder** - in the panel header or on right-click.

Output is not the alert history: alerts are matches of *your* rules in *your* files and
have their own history. Output never contains file contents, clipboard text or what you
searched for.

### The log file

Output is also saved to `%LOCALAPPDATA%\TKTail\logs\tktail.log` (portable mode:
`data\logs\` beside `TKTail.exe`), from **Info** upwards. The file is kept small: when it
reaches 1 MB it becomes `tktail.1.log` and a new one starts; at most 5 files are kept and files
older than 14 days are deleted. File paths are written as `<path>` unless you turn on
`log.includePaths`. Change these with `log.level`, `log.maxFileKB`, `log.maxFiles` and
`log.maxDays` (see `tktail settings list`).

The file is opened shortly after TKTail starts; what was logged before is written then, and a
TKTail closed sooner writes it as it exits - every normal exit keeps its lines. If TKTail is
ended abnormally (killed in Task Manager, a crash, a power loss) within the first moments after
starting, those first lines can be missing; once the file is open, each line is handed to
Windows as it is written. A linked window keeps its log in its own Output view only (the main
window writes the file).

## Problems

**Problems** lists what needs attention *now*. Unlike Output, which is a history, a problem
disappears by itself when its cause is gone - a missing file that appears again, settings that
can be saved again.

*Screenshot: Problems view with a missing file and an invalid alert rule*

| Problem | Goes away when |
|---|---|
| A file cannot be opened (error) | it is opened successfully |
| A monitored or open file is missing / not accessible | the file is back or readable again, or you close it |
| A monitored file cannot be opened in the background | it can be opened |
| An alert rule is not evaluated because its pattern is invalid | the rule is fixed or removed |
| Settings were ignored at start, or cannot be saved | you dismiss it / saving works again |
| The chosen data folder cannot be used (TKTail runs with the default one) | you dismiss it |
| The alert history or TKTail's log file cannot be used | you dismiss it |

- Errors come first, then warnings, newest first. The same cause is listed once, with a count
  ("3 times") if it happens again.
- **Double-click** or **Enter** opens what the problem is about: the file (try again), its folder
  in Windows Explorer, the settings file (for a line TKTail ignored), **Manage Alerts** (an alert that is not
  evaluated) or **Settings** (the data folder). Right-click for **Reveal in Explorer**,
  **Copy** (Ctrl+C; Ctrl+A selects all), **Copy Description**, **Copy File Path**, **Export...**
  (TSV, CSV or JSON Lines) and **Dismiss** (Del); a dismissed problem only comes back if its cause goes away and
  happens again.
- The number on the **PROBLEMS** tab and the **N problems** item at the right of the status bar
  show how many there are; clicking the status bar item opens the view. A new problem never
  takes the focus or switches the panel's tab.

## Alerts

**Alerts** lists what your alert rules found, newest first - the saved alert history
(`alerts.jsonl`, see [Alerts and monitoring](https://tktail.dev/help/alerts-and-monitoring/)), so alerts from
earlier sessions are there too. Open it with **Tools > Alert History**, **View > Tool Views >
Alerts** or **Show Alerts** in the status bar's Alerts menu.

*Screenshot: Alerts view: alerts of the Errors rule, unread and read, with the stored preview of the selected one*

- **Time**, **Rule**, **File**, **Matches** (several matches found at once count as one alert),
  **Offset** (byte position in the file) and **State** (**Unread** until you open it or mark it
  read).
- Type in the filter box to show only alerts whose rule or file contains the text; **Unread
  only** hides the alerts you have seen.
- Selecting an alert shows its file and the **stored preview** below the list - only what the
  `alerts.historyPreview` setting allowed to be saved (`none` saves no text at all); TKTail does
  not read the file for it.
- **Double-click** or **Enter** opens the alert: TKTail finds the very file the alert came from
  - by its identity, also after a rotation renamed it - and never a different file that only has
  the same name. The caret goes to the match, which is marked; following the end of the file
  pauses. If the file is gone or was truncated before that position, the status bar says so.
  Opening an alert marks it read.
- Right-click for **Open**, **Mark as Read**, **Mark All as Read**, **Copy** (Ctrl+C: time,
  rule, path, matches, offset and state, one alert per line; Ctrl+A selects all), **Copy Match**
  and **Copy Line** (the exact text in the file now - TKTail finds the file by its identity as
  Open does), **Copy Preview** (the stored preview), **Copy Path**, **Copy Details** (every
  field of the alert), **Export...** (all or the selected alerts as TSV, CSV or JSON Lines; also
  the header button) and **Reveal in Explorer**. The header buttons open, mark
  all as read and copy.
- **F8** / **Shift+F8** (**Tools > Next Alert / Previous Alert**) jump from the caret to the next
  or previous alert *in the current file*, and mark it read.
- The number on the **ALERTS** tab is the number of unread alerts in the history. A new alert
  never opens the panel or takes the focus.
- With the history switched off (`alerts.history` off, or safe mode) the view shows the alerts of
  this session only; they count as read once you look at TKTail.

## Incidents

**Incidents** lists what your alerts kept when they fired, newest first (see
[Alerts and monitoring](https://tktail.dev/help/alerts-and-monitoring/#incidents)). Open it with **Tools > Incidents** or
**View > Tool Views > Incidents**.

- **Time**, **Alert**, **Severity**, **State** (*Capturing* while TKTail still collects what
  follows the trigger; *Complete*, or *Partial* when some evidence is missing, with how many of its
  items are complete), **Matches** (an alert firing again within its cooldown joins the incident),
  **Status** (*New* until acknowledged; *pinned*) and **Trigger** (the record that matched, or the
  counter condition).
- Type in the filter box to show only incidents whose alert or trigger contains the text; the
  severity box shows **All severities**, **Warning and above**, **Error and above** or only
  **Critical** ones; **New only** hides the acknowledged ones. Click a column header to sort by it
  (again: the other way) - **Severity** puts the most severe first. The severity is written out
  (Error and Critical also in the attention colour) and is the alert's when it fired.
- The selected incident's **details** are beside the list: the alert and the version that fired,
  its condition, the trigger record, each evidence item with its state, reason and window, a
  preview of what was kept - the records around the trigger (the trigger marked `>`), the events,
  each counter's minimum / average / maximum and a sparkline with the trigger marked `^` - and how
  the capture went. Select text there and copy it with Ctrl+C.
- **Double-click** or **Enter** opens the trigger record in its file - the very file, found by
  its identity as an alert opens - and acknowledges the incident. **Open Evidence as Log** opens
  what the incident kept, even after the log was rotated or deleted: the records as a `.log` tab,
  events and samples as text tabs.
- Header buttons and right-click: **Acknowledge** (Acknowledge All), **Pin** (retention never
  removes a pinned incident), **Export...** (the selected incidents, one folder each, into a folder you choose), **Copy** / **Copy
  Details**, **Delete...** and **Clear History...** (both ask first; pinned incidents stay unless
  you choose otherwise; an incident still capturing is kept; exported folders are never touched).
  The copies **Open Evidence as Log** makes in the temporary folder are removed a day later (at the
  next start, unless one is still open).
- The number on the **INCIDENTS** tab is the number of new incidents. A new incident never opens
  the panel or takes the focus; clicking the notification of a counter alert shows its incident.

## Terminal

**Terminal** is a shell in the bottom panel: run `git log`, `Get-Content -Wait`, `ssh host` or
`wsl tail -f` next to the files you are reading. Open it with **View > Tool Views > Terminal**.

*Screenshot: Terminal view: Command Prompt in the folder of the open log, listing files and searching for errors*

- It starts the first time you open the view: **PowerShell 7** if it is installed, otherwise
  **Windows PowerShell**, otherwise **Command Prompt** - in the folder of the active file (or
  the Explorer's folder, or your user folder). **Open Terminal Here** (right-click a
  folder or file in the Explorer, its **...** menu, a document tab, or the Inspector's
  **...**) opens a new terminal in that folder. Command Prompt cannot start in a network
  folder; it then starts in your user folder and the status bar says so.
- Everything you type goes to the program - **Ctrl+C** interrupts it, it does not copy. TKTail
  keeps only **F6 / Shift+F6** (move between panes), **Ctrl+J** (hide the panel) and
  **Ctrl+Tab** (document tabs); **Alt+F4** still closes TKTail.
- **Ctrl+V**, **Ctrl+Shift+V** or **Shift+Insert** pastes. If the text has line breaks and the
  program does not mark pasted text (bracketed paste), TKTail asks first - each line break would
  run the text before it. Control characters are removed from pasted text.
- Scroll back with the mouse wheel, **Shift+PgUp / Shift+PgDn** or the scroll bar (the last
  10,000 lines, kept in memory only); typing returns to the bottom.
- **Select** text with the mouse (double-click: a word, a path or a URL; triple-click: a line;
  Alt+drag: a block) and copy it with **Ctrl+Shift+C** or right-click > **Copy** - Ctrl+C
  stays the program's interrupt. **Select All** is on the right-click menu.
- **Ctrl+Shift+F** (or right-click > **Find...**) searches the terminal's text: **Enter** goes to
  the next older match, **Shift+Enter** to the next newer one, **Aa** matches case, **Esc**
  closes the box. In full-screen programs
  (`less`, `vim`) the wheel scrolls the program.
- **Several terminals** (up to 8), each in its own tab above the terminal - `PowerShell —
  Service`, `CMD — Logs`. **+** after the tabs opens one with the default shell; its arrow
  (or a right-click on +) lets you pick the shell. **Ctrl+Shift+`** (from anywhere in TKTail),
  **View > Tool Views > New Terminal** and **Open Terminal Here** always open a new tab. Click a
  tab or press **Ctrl+Shift+PgUp / PgDn** to switch; each terminal keeps its own folder, output
  and scroll position, and keeps running while another one is shown. Drag tabs to reorder
  them; hover a tab for its shell, process id, start folder and state. The number on the
  **TERMINAL** tab says how many there are.
- The arrow next to **+** lists everything TKTail found on this PC: the shells, your **WSL**
  distributions (they start in the same folder), **SSH...** (asks for `user@host` and runs
  Windows' own `ssh.exe` - passwords and host keys are handled by ssh; TKTail saves nothing),
  your own profiles, and programs that open **their own window** such as **PuTTY**. **Run as
  Administrator** opens a shell as administrator in a separate window after Windows asks for
  permission - nothing runs as administrator inside TKTail.
- Your own profiles are lines in `settings.ini` (up to 8), for example Git Bash:
  `terminal.custom.0.name=Git Bash`, `terminal.custom.0.executable=C:\\Program Files\\Git\\bin\\bash.exe`
  (backslashes doubled, as the file stores them), `terminal.custom.0.arguments=--login -i`, and
  `terminal.custom.0.external=1` for a program that should open in its own window. The
  executable must be a full path to an `.exe` or `.com` file; other entries are ignored.
- Right-click a tab: **New Terminal**, **New Terminal Here** (in that tab's folder),
  **Rename...** (only the tab's name), **Restart Terminal**, **Close**, **Close Others**,
  **Close All Terminals**, **Copy Start Folder**, **Reveal Start Folder in Explorer**.
- When the shell ends, its tab stays (marked *exited*) with its last screen and the exit code;
  **Enter** restarts it in the same folder. **x** on a tab, a middle-click on it or
  **Ctrl+Shift+W** closes that terminal and ends the shell *and everything started from it* -
  other terminals are not affected. TKTail asks first only when programs besides the shell are
  running (one question for Close Others / Close All). Hiding the panel keeps terminals
  running.
- Exiting TKTail while terminals run asks first ("2 terminals are running"); `tktail app exit`
  from a command line does not ask.
- Nothing you type or see in the terminal is logged, saved or sent anywhere; after a restart of
  TKTail the terminal starts fresh.
- The terminal needs **Windows 10 version 1809 or Windows Server 2019** or later (the Windows
  pseudo console). On an older Windows - Windows Server 2016, for example - the rest of TKTail
  works and the view says *The integrated terminal requires Windows 10 version 1809 or Windows
  Server 2019 or later.* instead of starting a shell; its **+** menu still opens the profiles
  marked *(own window)* and **Run as Administrator**, each in a console window of its own
  ([System requirements](https://tktail.dev/help/system-requirements/#features-that-need-a-newer-windows)).
- The shell and the number of lines kept come from the settings `terminal.profile`
  (`auto`, `pwsh`, `powershell`, `cmd`) and `terminal.scrollback` (1,000 to 100,000) in
  `settings.ini` (`tktail settings list` shows them). Choosing the shell in the panel is
  *(planned)*.

## System

**System** shows how busy this PC is and what TKTail itself uses. Open it with **View > Tool
Views > System**.

- **This PC**: CPU (with the last 5 minutes as a small graph), memory in use, commit, the
  number of logical processors.
- **TKTail**: its CPU share and private bytes (both with a 5-minute graph), working set,
  handles, threads, GDI / USER objects, the open documents and the memory of their caches and
  line indexes, files monitored in the background, running terminals and jobs.
- It is updated once a second **only while you look at it** - on another tab, with the panel
  hidden, minimised or in the tray it does not sample at all. Before you open it the first
  time, it does not exist.
- **Copy** (Ctrl+C, the header button or right-click) copies the figures as text.

## Jobs

**Jobs** shows work that TKTail does in the background: searches (every search session), exports,
and building the line index of a large file. Open it with **View > Tool Views > Jobs**.

*Screenshot: Jobs view with a running search and a finished line-index job*

- **Operation**, **Source** (file or folder), **Progress** (a bar while the share done is
  known, plus what was found so far), **Elapsed** and **State** (Running, Completed, Failed with
  the reason, Cancelled, Incomplete with the reason). A search that could not search everything
  shows as Incomplete - its results stay in Search Results.
- **Cancel** (Del, the header button or right-click) stops a running search or export - the same
  as **Cancel** in Search Results or Advanced Search. Line indexing cannot be cancelled; it ends
  when you close the file.
- **Copy** (Ctrl+C; Ctrl+A selects all) copies the selected jobs, one per line.
- **Clear Completed** removes finished jobs; only the 20 most recent finished jobs are kept.
- The number on the **JOBS** tab is the number of running jobs. Jobs never open the panel or
  take the focus. Small files are indexed so quickly that they do not appear at all.

---

The HTML page: https://tktail.dev/help/bottom-panel/
