You almost have it.
All you to do is remove the outermost list() inside layout().
For completeness, the R reference documentation describes the namelength here.
plot_ly(pd, x = ~ x, y = ~ value, color = ~ variable) |>
layout(hoverlabel = list(namelength = -1L))