Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

refactor: strip the narrative comments the save-confirmation dedup added, keeping only the capture/record exclusion rationale (PIN-048)

Luigi Agostic183deba3530
diff --git a/internal/cli/actions/actions_download.go b/internal/cli/actions/actions_download.go
index 52c4dee0..3696ff36 100644
--- a/internal/cli/actions/actions_download.go
+++ b/internal/cli/actions/actions_download.go
@@ -41,11 +41,6 @@ func Download(client *http.Client, base, token string, args []string, output, ta
return
}
- // The envelope is the only way to get the bytes out when there is no file, so it
- // stays for the -o-less case. With -o the caller asked for a file, and printing it
- // too meant the confirmation arrived AFTER a blob whose "data" field is truncated
- // for display — base64 that cannot be decoded, from a command that had just written
- // the whole thing to disk.
if output == "" {
printDownloadResult(result)
return
diff --git a/internal/cli/actions/actions_download_test.go b/internal/cli/actions/actions_download_test.go
index 54a1b3e9..3c53539c 100644
--- a/internal/cli/actions/actions_download_test.go
+++ b/internal/cli/actions/actions_download_test.go
@@ -33,10 +33,6 @@ func TestDownloadTruncatesPrintedBase64(t *testing.T) {
}
}
-// With -o the caller asked for a file, so stdout is the confirmation and nothing else.
-// The envelope used to print first, and its "data" field is truncated for display — so
-// the command emitted undecodable base64 and then, below it, the sentence saying the
-// whole payload was already on disk.
func TestDownloadWithOutputConfirmsTheFileAndPrintsNoEnvelope(t *testing.T) {
data := []byte(strings.Repeat("image-bytes-", 40))
encoded := base64.StdEncoding.EncodeToString(data)
@@ -77,8 +73,6 @@ func TestDownloadWithOutputConfirmsTheFileAndPrintsNoEnvelope(t *testing.T) {
}
}
-// The wording is the one every artifact-saving command uses, so download's confirmation
-// must be indistinguishable from screenshot's and pdf's apart from the path and size.
func TestTheSaveConfirmationIsTheSameSentenceEverywhere(t *testing.T) {
dir := t.TempDir()
@@ -122,9 +116,6 @@ func TestTheSaveConfirmationIsTheSameSentenceEverywhere(t *testing.T) {
}
}
-// The census: the sentence had four identical open-coded copies. Find the owner by its
-// declaration so moving printSaved to another file does not break this, and require the
-// literal at least once — a rename would otherwise make the ban pass over nothing.
func TestTheSaveConfirmationHasOneOwner(t *testing.T) {
const sentence = `"Saved %s (%d bytes)"`
diff --git a/internal/cli/actions/output_file.go b/internal/cli/actions/output_file.go
index 5e19d51b..f8fe2b00 100644
--- a/internal/cli/actions/output_file.go
+++ b/internal/cli/actions/output_file.go
@@ -25,10 +25,6 @@ func writeOutputFile(path string, autoNamed bool, buf []byte) (string, error) {
return path, os.WriteFile(path, buf, 0600)
}
-// printSaved is the confirmation every artifact-saving command prints once it has a
-// file: the path actually used and the byte count. download, pdf and screenshot (twice)
-// each open-coded the identical sentence.
-//
// capture's lowercase "saved" and record's "Saved → %s" are deliberately NOT routed
// here. They are different sentences for different shapes — capture prints a save line
// alongside the snapshot that is half of what it returned, and record has no byte count