)]}'
{
  "commit": "d26eac6e8d283656be680973098ac3d65768ba2c",
  "tree": "50fcb3c71347e1936bb91ff3bc9d64dc3b3bd4e4",
  "parents": [
    "34ca370f8d0f897cd7f307c7bedfb1aa8ff7c5a8"
  ],
  "author": {
    "name": "George Engelbrecht",
    "email": "engeg@google.com",
    "time": "Tue Sep 22 19:09:10 2026 +0000"
  },
  "committer": {
    "name": "George Engelbrecht",
    "email": "engeg@google.com",
    "time": "Fri Oct 23 00:31:57 2026 +0000"
  },
  "message": "Search repositories with / on the host index\n\nThe finder answers \"/\" on every page that addresses a tree, but not on\nthe host index -- which is where readers arrive, and which is itself a\nlisting, of repositories rather than files. A keystroke that works\nnearly everywhere and then silently does nothing never becomes muscle\nmemory.\n\nRender the same palette there, over repository names. The page already\ncontains every repository it lists, so the finder reads them out of the\ndocument instead of asking for the same names again: a host index\nresponse names no revision and is therefore served no-store, so a\nsecond request would be made on every page load and cached after none\nof them. Reading the page also makes the finder\u0027s answers agree with it\nby construction -- nothing can be missing from the finder that the\nreader can already see.\n\nThe worker gains a load variant taking a list rather than a URL, and\nsorts it. That is not cosmetic: two of its lookups are binary searches\nover a byte-ordered index. indexOfPath is one, so an unsorted list\nsilently fails to find names that are present -- 2,828 of 2,838 on a\nreal host index. The literal-prefix channel is the other, so an\nunsorted list would leave a typed namespace unpromoted, which on a host\nindex is the common case: readers type \"platform/frameworks\", not a\nrepository\u0027s last segment. The directory-run compression additionally\nassumes sorted input for its speed. A git tree listing arrives sorted;\na list scraped from a page cannot be assumed to be.\n\nRepository results are never warmed. Warming is only worth doing\nbecause file links are SHA-pinned and therefore cacheable; a repository\nindex page names no revision, so a speculative fetch of one would be\ndiscarded and the request wasted.\n\nDescriptions are shown beside the name, as the page shows them, because\nrepository names alone are often not enough to choose between.\n\nVerified against a host index of 2,838 real repository names. Engine:\nevery name is found by typing it in full, none is absent from a search\nfor its own last segment, all 2,838 are located by indexOfPath, a\nshuffled list yields an identical index, and skipping the sort\ndemonstrably breaks it. Browser: the index is built with zero network\nrequests, rows link where the page links, nothing is warmed, Enter\nopens the repository, and returning offers it again. Keystroke to\nrepaint on that index is 3.9 ms median, 6.0 ms worst.\n\nRepository search sits inside the gitiles.fileSearch guard, so the one\nswitch covers both listings; FileSearchTest and Documentation/config.md\nreflect that.\n\nThree unit tests cover the new load path: that a supplied listing is\nused without a fetch, that it is sorted whatever order it arrives in,\nand that the sort is by UTF-8 bytes rather than UTF-16 code units. The\nlast one matters above the basic plane, where the two orders disagree\n-- Array#sort would put U+10000 before U+FFFD, the bytes run the other\nway -- and it discriminates: replacing the sort entirely fails two\ntests, replacing it with Array#sort fails exactly that one.\n\nEight more cover repository mode in the palette: that the listing is\nread out of the page and nothing is fetched, that rows link where the\npage links and carry the description, that repositories named after\nObject.prototype properties survive with or without a description, that\nEnter navigates and records the visit under the host index key, that an\nindex reached with or without a trailing slash keeps one history, that\nno repository page is ever warmed, that an empty index hides the trigger\nand offers no palette, and that the same repository listed twice is\noffered once. Reverted fixes were each caught -- building the name or\ndescription maps with an object literal instead of Object.create(null),\ndropping the repository-mode return from schedulePrefetch, dropping the\nduplicate skip, and keying history on the raw pathname. Unmutated, the\npalette suite passes 43 of 43 and the worker suite 21 of 21.\n\nBug: 564986686\nTAG\u003dagy\nCONV\u003d0b3e4b30-d902-4587-8bb2-ce23109d6955\nCONV\u003d60d1bfdf-34a4-460e-85ab-0f251e052543\nChange-Id: I82ec98521c722a6f316eed456e1894e5b7da98c7\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "523c7fdf3997fede6dd60b94ed439d7827544083",
      "old_mode": 33188,
      "old_path": "Documentation/config.md",
      "new_id": "ecca7e39495d241f14b6963d350a270b96e513eb",
      "new_mode": 33188,
      "new_path": "Documentation/config.md"
    },
    {
      "type": "modify",
      "old_id": "f21aec7da8f5792cb4f22933aca842344fa8a235",
      "old_mode": 33188,
      "old_path": "java/com/google/gitiles/Renderer.java",
      "new_id": "9931dab4849dffdafcfd5d28953e24fb9234ee2f",
      "new_mode": 33188,
      "new_path": "java/com/google/gitiles/Renderer.java"
    },
    {
      "type": "modify",
      "old_id": "798316b64fab4ec01adca6d964ef1f0244b5f28a",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gitiles/FileSearchTest.java",
      "new_id": "68414e668f9feb29b388c98f92ea300f710d1740",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gitiles/FileSearchTest.java"
    },
    {
      "type": "modify",
      "old_id": "2e4077e18c3f0a5335b8392e57def05ed6ba55bc",
      "old_mode": 33188,
      "old_path": "jstests/fake_dom.js",
      "new_id": "b2c7dcdae53951755e5ffb3e40a2adf08022ad58",
      "new_mode": 33188,
      "new_path": "jstests/fake_dom.js"
    },
    {
      "type": "modify",
      "old_id": "aefe3f471d9e775138d19180567103e0fe682a79",
      "old_mode": 33188,
      "old_path": "jstests/file_search_test.js",
      "new_id": "943c6113644ff4c13cea7a4dc2f4da88948e7d7b",
      "new_mode": 33188,
      "new_path": "jstests/file_search_test.js"
    },
    {
      "type": "modify",
      "old_id": "f4a0491fd29f771496ef9b0443d7c9aa4f2f12f8",
      "old_mode": 33188,
      "old_path": "jstests/file_search_worker_test.js",
      "new_id": "40100a134aca493e0bd82caa9beeb55edb000f78",
      "new_mode": 33188,
      "new_path": "jstests/file_search_worker_test.js"
    },
    {
      "type": "modify",
      "old_id": "e3814395162569afae77066b03f72dc8571cf4da",
      "old_mode": 33188,
      "old_path": "resources/com/google/gitiles/static/base.css",
      "new_id": "3116bb2d664de44a36c96f678583b5262ca57dae",
      "new_mode": 33188,
      "new_path": "resources/com/google/gitiles/static/base.css"
    },
    {
      "type": "modify",
      "old_id": "56ba5a4ff45e720b29964862ee4cc0d8b530558f",
      "old_mode": 33188,
      "old_path": "resources/com/google/gitiles/static/file-search-worker.js",
      "new_id": "1b0809d53bf767b3dc2674eb759c75ae11c3cc0c",
      "new_mode": 33188,
      "new_path": "resources/com/google/gitiles/static/file-search-worker.js"
    },
    {
      "type": "modify",
      "old_id": "7cbdb1317306cd814fce6f134b8be50d2b75af30",
      "old_mode": 33188,
      "old_path": "resources/com/google/gitiles/static/file-search.js",
      "new_id": "9f503b73fa9e18ab4a65c2da8af5bdd08bb11091",
      "new_mode": 33188,
      "new_path": "resources/com/google/gitiles/static/file-search.js"
    },
    {
      "type": "modify",
      "old_id": "0caf2cceebee1685cc795e0f1deb6e1231650a4d",
      "old_mode": 33188,
      "old_path": "resources/com/google/gitiles/templates/Common.soy",
      "new_id": "e335ae0928a018a1139f4c9363b2bd0cb1071b09",
      "new_mode": 33188,
      "new_path": "resources/com/google/gitiles/templates/Common.soy"
    },
    {
      "type": "modify",
      "old_id": "353fd4f1aa2e8c216e26ae0a69183e9a7af2cf8c",
      "old_mode": 33188,
      "old_path": "resources/com/google/gitiles/templates/HostIndex.soy",
      "new_id": "ea23b5f7d5dde248da597aa090d1bc00625410cd",
      "new_mode": 33188,
      "new_path": "resources/com/google/gitiles/templates/HostIndex.soy"
    }
  ]
}
