Lead with the route, since that is what was asked
Naming the conf file first got answers that sent people to edit host1.conf and mentioned the tab afterwards.
This commit is contained in:
@@ -134,7 +134,12 @@ $md .= "- **The AI tab** shows the AI sections together under **Settings → Con
|
|||||||
$md .= "Both write through the same guarded path: the change is validated, the conf is backed up,\n"
|
$md .= "Both write through the same guarded path: the change is validated, the conf is backed up,\n"
|
||||||
. "the result is syntax-checked and read back, and a bad write is rolled back.\n\n";
|
. "the result is syntax-checked and read back, and a bad write is rolled back.\n\n";
|
||||||
$md .= "A setting is edited by finding its row and changing the control described below. The Save\n"
|
$md .= "A setting is edited by finding its row and changing the control described below. The Save\n"
|
||||||
. "button sends only what was actually changed.\n\n---\n";
|
. "button sends only what was actually changed.\n\n";
|
||||||
|
$md .= "**When someone asks where a setting is, answer with the route.** Every setting here has a\n"
|
||||||
|
. "control in the browser, so the conf file it lands in is background rather than an\n"
|
||||||
|
. "instruction — telling someone to edit the file by hand is the wrong answer when a switch\n"
|
||||||
|
. "exists, and it is also the riskier one. The exception is the list at the very bottom:\n"
|
||||||
|
. "those settings genuinely have no control, and saying so is the right answer.\n\n---\n";
|
||||||
|
|
||||||
// A section with no section-level route may still have per-key routes, if a page carries a
|
// A section with no section-level route may still have per-key routes, if a page carries a
|
||||||
// purpose-built control for some of its settings. That is a reachable section — just one whose
|
// purpose-built control for some of its settings. That is a reachable section — just one whose
|
||||||
@@ -153,8 +158,11 @@ foreach ($sections as $k => $g) {
|
|||||||
$reachable++;
|
$reachable++;
|
||||||
|
|
||||||
$md .= "\n## " . $g['subsection'] . "\n\n";
|
$md .= "\n## " . $g['subsection'] . "\n\n";
|
||||||
$md .= "In `" . $g['file'] . "`.\n\n";
|
|
||||||
|
|
||||||
|
// The route leads. Naming the conf file first invited answers that told the operator to edit
|
||||||
|
// host1.conf and mentioned the tab as an afterthought — which is the habit this file exists
|
||||||
|
// to break. The file is still stated, because "where does this end up" is a fair question,
|
||||||
|
// but it is stated last and as a fact rather than as an instruction.
|
||||||
$seen = array_values(array_diff(array_unique($routes[$k]), ['__perkey__']));
|
$seen = array_values(array_diff(array_unique($routes[$k]), ['__perkey__']));
|
||||||
if (!$seen) {
|
if (!$seen) {
|
||||||
$md .= "No single page shows this section. Individual settings below carry their own route.\n\n";
|
$md .= "No single page shows this section. Individual settings below carry their own route.\n\n";
|
||||||
@@ -163,6 +171,7 @@ foreach ($sections as $k => $g) {
|
|||||||
: "Reachable from:\n\n" . implode("\n", array_map(fn($r) => "- $r", $seen)) . "\n\n";
|
: "Reachable from:\n\n" . implode("\n", array_map(fn($r) => "- $r", $seen)) . "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$md .= "Saved into `" . $g['file'] . "`, which does not need to be opened by hand.\n\n";
|
||||||
$md .= "| Setting | Control | Where | What it does |\n|---|---|---|---|\n";
|
$md .= "| Setting | Control | Where | What it does |\n|---|---|---|---|\n";
|
||||||
foreach ($g['fields'] as $f) {
|
foreach ($g['fields'] as $f) {
|
||||||
$ctl = UI_CONTROL_WORDS[$f['widget'] ?? 'text'] ?? 'a text box';
|
$ctl = UI_CONTROL_WORDS[$f['widget'] ?? 'text'] ?? 'a text box';
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user